net data validation

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2151 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-06-05 20:43:10 +00:00
parent 01be039820
commit bb98d9289d
+2 -3
View File
@@ -1685,6 +1685,7 @@ void process(ENetPacket *packet, int sender, int chan) // sender may be -1
case SV_PRIMARYWEAP:
{
int nextprimary = getint(p);
if(nextprimary<0 && nextprimary>=NUMGUNS) break;
cl->state.nextprimary = nextprimary;
break;
}
@@ -1735,7 +1736,7 @@ void process(ENetPacket *packet, int sender, int chan) // sender may be -1
else event.millis = cl->gameoffset + event.id; \
}
seteventmillis(shot.shot);
shot.shot.gun = getint(p);
shot.shot.gun = getint(p);
loopk(3) shot.shot.from[k] = getint(p)/DMF;
loopk(3) shot.shot.to[k] = getint(p)/DMF;
int hits = getint(p);
@@ -1924,8 +1925,6 @@ void process(ENetPacket *packet, int sender, int chan) // sender may be -1
}
vi->owner = sender;
vi->callmillis = servmillis;
//if(callvote(vi)) { QUEUE_MSG; sendf(sender, 1, "ri", SV_CALLVOTESUC); }
//else delete vi;
if(callvote(vi)) { QUEUE_MSG; }
else delete vi;
break;