// weapon switching impulses
-bool autocvar_g_weaponswitch_debug;
-
#define X(slot) \
IMPULSE(weapon_group_##slot) \
{ \
{ \
.entity weaponentity = weaponentities[wepslot]; \
W_NextWeaponOnImpulse(this, slot, weaponentity); \
- if(wepslot == 0 && !autocvar_g_weaponswitch_debug) \
+ if(wepslot == 0 && autocvar_g_weaponswitch_debug != 1) \
break; \
} \
}
{ \
.entity weaponentity = weaponentities[wepslot]; \
W_CycleWeapon(this, this.cvar_cl_weaponpriorities[slot], dir, weaponentity); \
- if(wepslot == 0 && !autocvar_g_weaponswitch_debug) \
+ if(wepslot == 0 && autocvar_g_weaponswitch_debug != 1) \
break; \
} \
}
{ \
.entity weaponentity = weaponentities[slot]; \
W_SwitchWeapon(this, Weapons_from(WEP_FIRST + i), weaponentity); \
- if(slot == 0 && !autocvar_g_weaponswitch_debug) \
+ if(slot == 0 && autocvar_g_weaponswitch_debug != 1) \
break; \
} \
}
.entity weaponentity = weaponentities[slot];
W_NextWeapon(this, 0, weaponentity);
- if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ if(slot == 0 && autocvar_g_weaponswitch_debug != 1)
break;
}
}
.entity weaponentity = weaponentities[slot];
W_PreviousWeapon(this, 0, weaponentity);
- if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ if(slot == 0 && autocvar_g_weaponswitch_debug != 1)
break;
}
}
.entity weaponentity = weaponentities[slot];
W_NextWeapon(this, 1, weaponentity);
- if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ if(slot == 0 && autocvar_g_weaponswitch_debug != 1)
break;
}
}
.entity weaponentity = weaponentities[slot];
W_PreviousWeapon(this, 1, weaponentity);
- if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ if(slot == 0 && autocvar_g_weaponswitch_debug != 1)
break;
}
}
.entity weaponentity = weaponentities[slot];
W_NextWeapon(this, 2, weaponentity);
- if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ if(slot == 0 && autocvar_g_weaponswitch_debug != 1)
break;
}
}
.entity weaponentity = weaponentities[slot];
W_PreviousWeapon(this, 2, weaponentity);
- if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ if(slot == 0 && autocvar_g_weaponswitch_debug != 1)
break;
}
}
.entity weaponentity = weaponentities[slot];
W_LastWeapon(this, weaponentity);
- if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ if(slot == 0 && autocvar_g_weaponswitch_debug != 1)
break;
}
}
.entity weaponentity = weaponentities[slot];
W_SwitchWeapon(this, w_getbestweapon(this, weaponentity), weaponentity);
- if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ if(slot == 0 && autocvar_g_weaponswitch_debug != 1)
break;
}
}
.entity weaponentity = weaponentities[slot];
W_ThrowWeapon(this, weaponentity, W_CalculateProjectileVelocity(this, this.velocity, v_forward * 750, false), '0 0 0', true);
- if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ if(slot == 0 && autocvar_g_weaponswitch_debug != 1)
break;
}
}
Weapon w = this.(weaponentity).m_weapon;
w.wr_reload(w, actor, weaponentity);
- if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ if(slot == 0 && autocvar_g_weaponswitch_debug != 1)
break;
}
}
void ImpulseCommands(entity this)
{
- if (gameover) return;
+ if (game_stopped) return;
int imp = this.impulse;
if (!imp) return;
{
delete(this.personal);
this.personal = NULL;
+
+ if((g_cts || g_race) && autocvar_g_allow_checkpoints)
+ ClientKill(this);
}
sprint(this, "personal waypoint cleared\n");
}
{
delete(this.personal);
this.personal = NULL;
+ if((g_cts || g_race) && autocvar_g_allow_checkpoints)
+ ClientKill(this);
}
sprint(this, "all waypoints cleared\n");
}
IL_EACH(g_spawnpoints, true,
{
vector org = it.origin;
- tracebox(it.origin, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin - '0 0 512', MOVE_NOMONSTERS, NULL);
+ tracebox(it.origin, PL_MIN_CONST, PL_MAX_CONST, it.origin - '0 0 512', MOVE_NOMONSTERS, NULL);
setorigin(it, trace_endpos);
if (navigation_findnearestwaypoint(it, false))
{