text
stringlengths 0
692
|
---|
for (new i = max_clients + 1; i < max_entities; ++i) { |
if (pev_valid(i) && entity == pev(i, pev_owner)) { |
new wname[32] |
pev(i, pev_classname, wname, sizeof wname - 1) |
return get_weaponid(wname) |
} |
} |
return 0 |
} |
// safe removal of weaponbox+weapon_* entity pair (delay =~= 0.03 second) |
#define fm_remove_weaponbox(%1) dllfunc(DLLFunc_Think, %1) |
/* stock fm_remove_weaponbox(entity) |
return dllfunc(DLLFunc_Think, entity) */ |
/* Half-Life Software Development Kit constants |
* |
* by the AMX Mod X Development Team |
* |
* This file is provided as is (no warranties). |
* |
*/ |
#if defined _hlsdk_const_included |
#endinput |
#endif |
#define _hlsdk_const_included |
// pev(entity, pev_button) or pev(entity, pev_oldbuttons) values |
#define IN_ATTACK (1<<0) |
#define IN_JUMP (1<<1) |
#define IN_DUCK (1<<2) |
#define IN_FORWARD (1<<3) |
#define IN_BACK (1<<4) |
#define IN_USE (1<<5) |
#define IN_CANCEL (1<<6) |
#define IN_LEFT (1<<7) |
#define IN_RIGHT (1<<8) |
#define IN_MOVELEFT (1<<9) |
#define IN_MOVERIGHT (1<<10) |
#define IN_ATTACK2 (1<<11) |
#define IN_RUN (1<<12) |
#define IN_RELOAD (1<<13) |
#define IN_ALT1 (1<<14) |
#define IN_SCORE (1<<15) // Used by client.dll for when scoreboard is held down |
// pev(entity, pev_flags) values |
#define FL_FLY (1<<0) // Changes the SV_Movestep() behavior to not need to be on ground |
#define FL_SWIM (1<<1) // Changes the SV_Movestep() behavior to not need to be on ground (but stay in water) |
#define FL_CONVEYOR (1<<2) |
#define FL_CLIENT (1<<3) |
#define FL_INWATER (1<<4) |
#define FL_MONSTER (1<<5) |
#define FL_GODMODE (1<<6) |
#define FL_NOTARGET (1<<7) |
#define FL_SKIPLOCALHOST (1<<8) // Don't send entity to local host, it's predicting this entity itself |
#define FL_ONGROUND (1<<9) // At rest / on the ground |
#define FL_PARTIALGROUND (1<<10) // Not all corners are valid |
#define FL_WATERJUMP (1<<11) // Player jumping out of water |
#define FL_FROZEN (1<<12) // Player is frozen for 3rd person camera |
#define FL_FAKECLIENT (1<<13) // JAC: fake client, simulated server side; don't send network messages to them |
#define FL_DUCKING (1<<14) // Player flag -- Player is fully crouched |
#define FL_FLOAT (1<<15) // Apply floating force to this entity when in water |
#define FL_GRAPHED (1<<16) // Worldgraph has this ent listed as something that blocks a connection |
#define FL_IMMUNE_WATER (1<<17) |
#define FL_IMMUNE_SLIME (1<<18) |
#define FL_IMMUNE_LAVA (1<<19) |
#define FL_PROXY (1<<20) // This is a spectator proxy |
#define FL_ALWAYSTHINK (1<<21) // Brush model flag -- call think every frame regardless of nextthink - ltime (for constantly changing velocity/path) |
#define FL_BASEVELOCITY (1<<22) // Base velocity has been applied this frame (used to convert base velocity into momentum) |
#define FL_MONSTERCLIP (1<<23) // Only collide in with monsters who have FL_MONSTERCLIP set |
#define FL_ONTRAIN (1<<24) // Player is _controlling_ a train, so movement commands should be ignored on client during prediction. |
#define FL_WORLDBRUSH (1<<25) // Not moveable/removeable brush entity (really part of the world, but represented as an entity for transparency or something) |
#define FL_SPECTATOR (1<<26) // This client is a spectator, don't run touch functions, etc. |
#define FL_CUSTOMENTITY (1<<29) // This is a custom entity |
#define FL_KILLME (1<<30) // This entity is marked for death -- This allows the engine to kill ents at the appropriate time |
#define FL_DORMANT (1<<31) // Entity is dormant, no updates to client |
// engfunc(EngFunc_WalkMove, entity, Float:yaw, Float:dist, iMode) iMode values |
#define WALKMOVE_NORMAL 0 // Normal walkmove |
#define WALKMOVE_WORLDONLY 1 // Doesn't hit ANY entities, no matter what the solid type |
#define WALKMOVE_CHECKONLY 2 // Move, but don't touch triggers |
// pev(entity, pev_movetype) values |
#define MOVETYPE_NONE 0 // Never moves |
#define MOVETYPE_WALK 3 // Player only - moving on the ground |
#define MOVETYPE_STEP 4 // Gravity, special edge handling -- monsters use this |
#define MOVETYPE_FLY 5 // No gravity, but still collides with stuff |
#define MOVETYPE_TOSS 6 // Gravity/Collisions |
#define MOVETYPE_PUSH 7 // No clip to world, push and crush |
#define MOVETYPE_NOCLIP 8 // No gravity, no collisions, still do velocity/avelocity |
#define MOVETYPE_FLYMISSILE 9 // Extra size to monsters |
#define MOVETYPE_BOUNCE 10 // Just like Toss, but reflect velocity when contacting surfaces |
#define MOVETYPE_BOUNCEMISSILE 11 // Bounce w/o gravity |
#define MOVETYPE_FOLLOW 12 // Track movement of aiment |
#define MOVETYPE_PUSHSTEP 13 // BSP model that needs physics/world collisions (uses nearest hull for world collision) |
// pev(entity, pev_solid) values |
// NOTE: Some movetypes will cause collisions independent of SOLID_NOT/SOLID_TRIGGER when the entity moves |