31 wep.owner = wep.enemy = own;
33 wep.colormap = own.colormap;
61 float weptimeleft = timeleft / superweapons;
62 wep.superweapons_finished =
time + weptimeleft;
66 own.statuseffects.statuseffect_time[STATUSEFFECT_Superweapon.m_id] -= weptimeleft;
77 wep.pickup_anyway =
true;
80 if(ammotype == RES_NONE)
89 int i = own.(weaponentity).
m_weapon.m_id;
90 if(own.(weaponentity).(weapon_load[i]) > 0)
92 GiveResource(own, ammotype, own.(weaponentity).(weapon_load[i]));
100 int i = own.(weaponentity).
m_weapon.m_id;
101 if(own.(weaponentity).(weapon_load[i]) > 0)
103 GiveResource(own, ammotype, own.(weaponentity).(weapon_load[i]));
126 if (w == WEP_Null.m_id)
150 if(!(
STAT(WEAPONS,
this) & set))
return;
151 STAT(WEAPONS,
this) &= ~set;
void navigation_dynamicgoal_init(entity this, bool initially_static)
#define MUTATOR_CALLHOOK(id,...)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void SetResource(entity e, Resource res_type, float amount)
Sets the current amount of resource the given entity will have.
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Resource ammo_type
M: ammotype : main ammo type.
const int IT_UNLIMITED_SUPERWEAPONS
void W_SwitchWeapon_Force(Player this, Weapon w,.entity weaponentity)
Header file that describes the functions related to game items.
#define ITEM_SET_EXPIRING(item, expiring)
Sets the item expiring status (i.e.
#define ITEM_SET_LOOT(item, loot)
Sets the item loot status.
#define FOREACH(list, cond, body)
@ STATUSEFFECT_REMOVE_CLEAR
Effect is being forcibly removed without calling any additional mechanics.
void Send_Notification(NOTIF broadcast, entity client, MSG net_type, Notification net_name,...count)
#define REGISTRY_GET(id, i)
#define w_getbestweapon(ent, wepent)
float autocvar_g_balance_superweapons_time
int autocvar_g_pickup_items
void StatusEffects_remove(StatusEffect this, entity actor, int removal_type)
float StatusEffects_gettime(StatusEffect this, entity actor)
void StatusEffects_update(entity e)
void GiveResource(entity receiver, Resource res_type, float amount)
Gives an entity some resource.
Header file that describes the resource system.
void W_ThrowWeapon(entity this,.entity weaponentity, vector velo, vector delta, float doreduce)
void SpawnThrownWeapon(entity this, vector org, Weapon wep,.entity weaponentity)
bool W_IsWeaponThrowable(entity this, int w)
float W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vector velo,.entity weaponentity)
bool autocvar_g_weapon_throwable
WepSet WEPSET_SUPERWEAPONS
#define WepSet_FromWeapon(it)
const int WS_READY
idle frame
void weapon_defaultspawnfunc(entity this, Weapon e)
void W_DropEvent(.void(Weapon, entity actor,.entity) event, entity player, int weapon_type, entity weapon_item,.entity weaponentity)
float weapon_load[REGISTRY_MAX(Weapons)]