clean up and trying to identify why sometimes after a spawn, it is not possible to get some items
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5633 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+14
-14
@@ -102,19 +102,19 @@ COMMAND(setedithide, ARG_CONC);
|
||||
void seteditshow(char *just)
|
||||
{
|
||||
eh_ents.setsize(0);
|
||||
if(just && just[0] != '\0')
|
||||
{
|
||||
const char *s = strtok(just, " ");
|
||||
int sn = -1;
|
||||
int tn = atoi(s);
|
||||
loopi(MAXENTTYPES) if(!strcmp(entnames[i], s)) sn = i;
|
||||
if(sn==-1) sn = tn;
|
||||
loopi(MAXENTTYPES-1)
|
||||
{
|
||||
int j = i+1;
|
||||
if(j!=sn) eh_ents.add(j);
|
||||
}
|
||||
}
|
||||
if(just && just[0] != '\0')
|
||||
{
|
||||
const char *s = strtok(just, " ");
|
||||
int sn = -1;
|
||||
int tn = atoi(s);
|
||||
loopi(MAXENTTYPES) if(!strcmp(entnames[i], s)) sn = i;
|
||||
if(sn==-1) sn = tn;
|
||||
loopi(MAXENTTYPES-1)
|
||||
{
|
||||
int j = i+1;
|
||||
if(j!=sn) eh_ents.add(j);
|
||||
}
|
||||
}
|
||||
}
|
||||
COMMAND(seteditshow, ARG_1STR);
|
||||
|
||||
@@ -241,7 +241,7 @@ void trypickup(int n, playerent *d)
|
||||
switch(e.type)
|
||||
{
|
||||
default:
|
||||
if( d->canpickup(e.type) && lastmillis > e.lastmillis + 100 && lastmillis > lastspawn + 500 )
|
||||
if( d->canpickup(e.type) && lastmillis > e.lastmillis + 250 && lastmillis > lastspawn + 500 )
|
||||
{
|
||||
if(d->type==ENT_PLAYER) addmsg(SV_ITEMPICKUP, "ri", n);
|
||||
else if(d->type==ENT_BOT && serverpickup(n, -1)) pickupeffects(n, d);
|
||||
|
||||
+1
-1
@@ -229,7 +229,7 @@ public:
|
||||
bool akimbo;
|
||||
int ammo[NUMGUNS], mag[NUMGUNS], gunwait[NUMGUNS];
|
||||
|
||||
playerstate() : primary(GUN_ASSAULT), nextprimary(GUN_ASSAULT) {}
|
||||
playerstate() : armour(0), primary(GUN_ASSAULT), nextprimary(GUN_ASSAULT), akimbo(false) {}
|
||||
virtual ~playerstate() {}
|
||||
|
||||
itemstat &itemstats(int type)
|
||||
|
||||
Reference in New Issue
Block a user