23 #define IMPULSE(id) _IMPULSE(IMP_##id) 24 #define _IMPULSE(id) \ 25 void id##_handle(entity this); \ 26 STATIC_INIT_LATE(id) \ 28 id.impulse_handle = id##_handle; \ 30 void id##_handle(entity this) 71 IMPULSE(weapon_group_##i) \ 73 weapon_group_handle(this, i, IMP_weapon_group_##i.impulse); \ 107 IMPULSE(weapon_priority_##i##_##dir) \ 109 noref int prev = -1; \ 110 noref int best = 0; \ 111 noref int next = +1; \ 112 weapon_priority_handle(this, dir, i, IMP_weapon_priority_##i##_##dir.impulse); \ 168 IMPULSE(weapon_byid_##i) \ 170 weapon_byid_handle(this, i, IMP_weapon_byid_##i.impulse); \ 203 this.
impulse = IMP_weapon_next_byid.impulse;
221 this.
impulse = IMP_weapon_prev_byid.impulse;
239 this.
impulse = IMP_weapon_next_bygroup.impulse;
257 this.
impulse = IMP_weapon_prev_bygroup.impulse;
275 this.
impulse = IMP_weapon_next_bypriority.impulse;
293 this.
impulse = IMP_weapon_prev_bypriority.impulse;
343 vector vecs = ((md.x > 0) ? md :
'0 0 0');
363 Weapon w = this.(weaponentity).m_weapon;
364 w.wr_reload(w, actor, weaponentity);
374 if (game_stopped)
return;
376 int imp =
CS(
this).impulse;
378 CS(
this).impulse = 0;
387 #define X(id) case IMP_##id.impulse: 402 FOREACH(IMPULSES, it.impulse == imp, {
403 void(entity) f = it.impulse_handle;
417 entity wp = WaypointSprite_DeployPersonal(WP_Waypoint,
this, this.
origin, RADARICON_WAYPOINT);
418 if (wp) WaypointSprite_Ping(wp);
419 sprint(
this,
"personal waypoint spawned at location\n");
425 entity wp = WaypointSprite_DeployPersonal(WP_Waypoint,
this,
trace_endpos, RADARICON_WAYPOINT);
426 if (wp) WaypointSprite_Ping(wp);
427 sprint(
this,
"personal waypoint spawned at crosshair\n");
433 entity wp = WaypointSprite_DeployPersonal(WP_Waypoint,
this, this.
death_origin, RADARICON_WAYPOINT);
434 if (wp) WaypointSprite_Ping(wp);
435 sprint(
this,
"personal waypoint spawned at death location\n");
444 entity wp = WaypointSprite_Attach(WP_Helpme,
this,
true, RADARICON_HELPME);
445 if (!wp) WaypointSprite_HelpMePing(this.waypointsprite_attachedforcarrier);
446 else WaypointSprite_Ping(wp);
448 sprint(
this,
"HELP ME attached\n");
453 entity wp = WaypointSprite_DeployFixed(WP_Here,
false,
this, this.
origin, RADARICON_HERE);
454 if (wp) WaypointSprite_Ping(wp);
455 sprint(
this,
"HERE spawned at location\n");
461 entity wp = WaypointSprite_DeployFixed(WP_Here,
false,
this,
trace_endpos, RADARICON_HERE);
462 if (wp) WaypointSprite_Ping(wp);
463 sprint(
this,
"HERE spawned at crosshair\n");
469 entity wp = WaypointSprite_DeployFixed(WP_Here,
false,
this, this.
death_origin, RADARICON_HERE);
470 if (wp) WaypointSprite_Ping(wp);
471 sprint(
this,
"HERE spawned at death location\n");
476 entity wp = WaypointSprite_DeployFixed(WP_Danger,
false,
this, this.
origin, RADARICON_DANGER);
477 if (wp) WaypointSprite_Ping(wp);
478 sprint(
this,
"DANGER spawned at location\n");
484 entity wp = WaypointSprite_DeployFixed(WP_Danger,
false,
this,
trace_endpos, RADARICON_DANGER);
485 if (wp) WaypointSprite_Ping(wp);
486 sprint(
this,
"DANGER spawned at crosshair\n");
492 entity wp = WaypointSprite_DeployFixed(WP_Danger,
false,
this, this.
death_origin, RADARICON_DANGER);
493 if (wp) WaypointSprite_Ping(wp);
494 sprint(
this,
"DANGER spawned at death location\n");
499 WaypointSprite_ClearPersonal(
this);
508 sprint(
this,
"personal waypoint cleared\n");
513 WaypointSprite_ClearOwned(
this);
521 sprint(
this,
"all waypoints cleared\n");
#define round_handler_IsActive()
void weapon_group_handle(entity this, int number, int imp)
Impulse map:
void W_SwitchWeapon_TryOthers(entity this, Weapon w,.entity weaponentity)
#define w_getbestweapon(ent, wepent)
void W_NextWeapon(entity this, int list,.entity weaponentity)
void ClientKill(entity this)
float CheatImpulse(entity this, int imp)
#define REGISTRY_GET(id, i)
ClientState CS(Client this)
bool vehicle_impulse(entity this, int imp)
const float TIMEOUT_ACTIVE
#define round_handler_IsRoundStarted()
void W_ThrowWeapon(entity this,.entity weaponentity, vector velo, vector delta, float doreduce)
bool weaponLocked(entity player)
bool MinigameImpulse(entity this, int imp)
bool autocvar_g_weaponswitch_debug
bool W_DualWielding(entity player)
const int MAX_WEAPONSLOTS
bool autocvar_g_allow_checkpoints
void PlayerUseKey(entity this)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
void WarpZone_crosshair_trace(entity pl)
void W_NextWeaponOnImpulse(entity this, float imp,.entity weaponentity)
bool W_SwitchWeapon(entity this, Weapon w,.entity weaponentity)
#define MUTATOR_CALLHOOK(id,...)
entity weaponentities[MAX_WEAPONSLOTS]
vector W_CalculateProjectileVelocity(entity actor, vector pvelocity, vector mvelocity, float forceAbsolute)
void WarpZone_crosshair_trace_plusvisibletriggers(entity pl)
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
prev prev prev prev prev best best best best best next next next next next void weapon_byid_handle(entity this, int number, int imp)
#define FOREACH(list, cond, body)
void W_CycleWeapon(entity this, string weaponorder, float dir,.entity weaponentity)
void W_LastWeapon(entity this,.entity weaponentity)
void W_PreviousWeapon(entity this, float list,.entity weaponentity)
void ImpulseCommands(entity this)