diff --git a/source/src/entities.cpp b/source/src/entities.cpp index cbd1b256..c61b9d4b 100644 --- a/source/src/entities.cpp +++ b/source/src/entities.cpp @@ -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); diff --git a/source/src/entity.h b/source/src/entity.h index 5c78b9f1..e33d6532 100644 --- a/source/src/entity.h +++ b/source/src/entity.h @@ -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)