Skip to content

Commit

Permalink
Add some kind of checking, so that things don't get lasatted by bunkers.
Browse files Browse the repository at this point in the history
  • Loading branch information
perim committed Feb 27, 2011
1 parent 88788ad commit 639f735
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/multistruct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ BOOL recvLasSat(NETQUEUE queue)
STRUCTURE *psStruct;
uint32_t id,targetid;

// TODO Add some kind of checking, so that things don't get lasatted by bunkers.
NETbeginDecode(queue, GAME_LASSAT);
NETuint8_t(&player);
NETuint32_t(&id);
Expand All @@ -269,7 +268,7 @@ BOOL recvLasSat(NETQUEUE queue)
psStruct = IdToStruct (id, player);
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
proj_SendProjectile(&psStruct->asWeaps[0], NULL, player, psObj->pos, psObj, true, 0);
Expand Down

0 comments on commit 639f735

Please sign in to comment.