Add some kind of checking, so that things don't get lasatted by bunkers.

master
Per Inge Mathisen 2011-02-27 10:56:01 +01:00
parent 88788ad501
commit 639f735b27
1 changed files with 1 additions and 2 deletions

View File

@ -258,7 +258,6 @@ BOOL recvLasSat(NETQUEUE queue)
STRUCTURE *psStruct; STRUCTURE *psStruct;
uint32_t id,targetid; uint32_t id,targetid;
// TODO Add some kind of checking, so that things don't get lasatted by bunkers.
NETbeginDecode(queue, GAME_LASSAT); NETbeginDecode(queue, GAME_LASSAT);
NETuint8_t(&player); NETuint8_t(&player);
NETuint32_t(&id); NETuint32_t(&id);
@ -269,7 +268,7 @@ BOOL recvLasSat(NETQUEUE queue)
psStruct = IdToStruct (id, player); psStruct = IdToStruct (id, player);
psObj = IdToPointer(targetid, targetplayer); psObj = IdToPointer(targetid, targetplayer);
if (psStruct && psObj) if (psStruct && psObj && psStruct->pStructureType->psWeapStat[0]->weaponSubClass == WSC_LAS_SAT)
{ {
// Give enemy no quarter, unleash the lasat // Give enemy no quarter, unleash the lasat
proj_SendProjectile(&psStruct->asWeaps[0], NULL, player, psObj->pos, psObj, true, 0); proj_SendProjectile(&psStruct->asWeaps[0], NULL, player, psObj->pos, psObj, true, 0);