# # reload_weapon - reload the current weapon # It returns the amount of ammo left. # def reload_weapon (self): return self._cache.reload_weapon ()
# # reload_weapon - reload the current weapon # It returns the amount of ammo left. # def reload_weapon (self): return self._basic.reload_weapon ()
neo/game/Player.cpp
/* =============== idPlayer::reload_weapon =============== */ int idPlayer::reload_weapon (void) { if ( gameLocal.isClient ) { return -1; } if ( spectating || gameLocal.inCinematic || influenceActive ) { return -1; } if ( weapon.GetEntity() && weapon.GetEntity()->IsLinked() ) { weapon.GetEntity()->Reload (); return inventory.ammo[currentWeapon]; } return -1; }
neo/game/Player.h
void select (int bitmask); int ChangeWeapon (int new_weapon); int reload_weapon (void);
neo/game/ai/pybot.cpp
/* * rpcReloadWeapon - return the amount of ammo available for the current weapon * after reloading. */ void pyBotClass::rpcReloadWeapon (void) { char buf[1024]; int ammo; if (protocol_debugging) gameLocal.Printf ("rpcReloadWeapon call by python\n"); if (rpcId > 0) ammo = dictionary->reload_weapon (rpcId); else ammo = 0; idStr::snPrintf (buf, sizeof (buf), "%d\n", ammo); buffer.pyput (buf); state = toWrite; }
/* * reload_weapon - reload the current weapon and return the * ammo available for the current weapon. */ int dict::reload_weapon (int id) { return entry[id]->reload_weapon (); }
neo/game/ai/pybot.cpp
int health (void); int angle (void); int reload_weapon (void); bool aim (idEntity *enemy); int turn (int angle, int angle_vel); idEntity *getIdEntity (void);
neo/game/ai/pybot.cpp
/* * reload_weapon */ int item::reload_weapon (void) { switch (kind) { case item_monster: assert (false); return 0; // ignore break; case item_player: return idplayer->reload_weapon (); } assert (false); return 0; }
This document was produced using groff-1.22.