Moved all possibly game-specific flags (such as FL_FLASHLIGHT) into gflags,
this affects mods. Please check the diff to see what you'll need to adjust.
This commit is contained in:
parent
065dd926cd
commit
d9dababe65
93 changed files with 308 additions and 196 deletions
|
@ -475,7 +475,7 @@ HUD_DrawFlashlight(void)
|
|||
pos = g_hudmins + [g_hudres[0] - 48, 16];
|
||||
|
||||
/* both on, draw both sprites at full intensity */
|
||||
if (pl.flags & FL_FLASHLIGHT) {
|
||||
if (pl.gflags & GF_FLASHLIGHT) {
|
||||
drawsubpic(
|
||||
pos,
|
||||
[32,32],
|
||||
|
@ -518,13 +518,13 @@ HUD_DrawZones(void)
|
|||
vector pos = [0,0,0];
|
||||
player pl = (player)pSeat->m_ePlayer;
|
||||
|
||||
if (pl.flags & FL_BUYZONE) {
|
||||
if (pl.gflags & GF_BUYZONE) {
|
||||
zc++;
|
||||
}
|
||||
if (pl.flags & FL_BOMBZONE) {
|
||||
if (pl.gflags & GF_BOMBZONE) {
|
||||
zc++;
|
||||
}
|
||||
if (pl.flags & FL_RESCUEZONE) {
|
||||
if (pl.gflags & GF_RESCUEZONE) {
|
||||
zc++;
|
||||
}
|
||||
if (pl.g_items & ITEM_DEFUSAL) {
|
||||
|
@ -533,7 +533,7 @@ HUD_DrawZones(void)
|
|||
|
||||
pos = g_hudmins + [16, (g_hudres[1] / 2) - (zc * 16)];
|
||||
|
||||
if (pl.flags & FL_BUYZONE) {
|
||||
if (pl.gflags & GF_BUYZONE) {
|
||||
drawsubpic(
|
||||
pos,
|
||||
[32,32],
|
||||
|
@ -546,7 +546,7 @@ HUD_DrawZones(void)
|
|||
);
|
||||
pos[1] += 32;
|
||||
}
|
||||
if (pl.flags & FL_BOMBZONE) {
|
||||
if (pl.gflags & GF_BOMBZONE) {
|
||||
drawsubpic(
|
||||
pos,
|
||||
[32,32],
|
||||
|
@ -559,7 +559,7 @@ HUD_DrawZones(void)
|
|||
);
|
||||
pos[1] += 32;
|
||||
}
|
||||
if (pl.flags & FL_RESCUEZONE) {
|
||||
if (pl.gflags & GF_RESCUEZONE) {
|
||||
drawsubpic(
|
||||
pos,
|
||||
[32,32],
|
||||
|
|
|
@ -14,6 +14,35 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
void
|
||||
Player_PreDraw(base_player pl, int thirdperson)
|
||||
{
|
||||
/* Handle the flashlights... */
|
||||
if (pl.gflags & GF_FLASHLIGHT) {
|
||||
vector src;
|
||||
vector ang;
|
||||
|
||||
if (pl.entnum != player_localentnum) {
|
||||
src = pl.origin + pl.view_ofs;
|
||||
ang = [pl.pitch, pl.angles[1], pl.angles[2]];
|
||||
} else {
|
||||
src = pSeat->m_vecPredictedOrigin + [0,0,-8];
|
||||
ang = view_angles;
|
||||
}
|
||||
|
||||
makevectors(ang);
|
||||
traceline(src, src + (v_forward * 8096), MOVE_NORMAL, pl);
|
||||
|
||||
if (serverkeyfloat("*bspversion") == 30) {
|
||||
dynamiclight_add(trace_endpos + (v_forward * -2), 128, [1,1,1]);
|
||||
} else {
|
||||
float p = dynamiclight_add(src, 512, [1,1,1], 0, "textures/flashlight");
|
||||
dynamiclight_set(p, LFIELD_ANGLES, ang);
|
||||
dynamiclight_set(p, LFIELD_FLAGS, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Player_ReceiveEntity(float new)
|
||||
{
|
||||
|
@ -80,8 +109,10 @@ Player_ReceiveEntity(float new)
|
|||
|
||||
if (fl & PLAYER_VELOCITY_Z)
|
||||
pl.velocity[2] = readcoord();
|
||||
if (fl & PLAYER_FLAGS)
|
||||
if (fl & PLAYER_FLAGS) {
|
||||
pl.flags = readfloat();
|
||||
pl.gflags = readfloat();
|
||||
}
|
||||
if (fl & PLAYER_WEAPON)
|
||||
pl.activeweapon = readbyte();
|
||||
if (fl & PLAYER_ITEMS)
|
||||
|
|
|
@ -120,31 +120,6 @@ var float autocvar_crouchheight = 0;
|
|||
float
|
||||
player::predraw(void)
|
||||
{
|
||||
/* Handle the flashlights... */
|
||||
if (flags & FL_FLASHLIGHT) {
|
||||
vector src;
|
||||
vector ang;
|
||||
|
||||
if (this.entnum != player_localentnum) {
|
||||
src = origin + view_ofs;
|
||||
ang = [pitch, angles[1], angles[2]];
|
||||
} else {
|
||||
src = pSeat->m_vecPredictedOrigin + [0,0,-8];
|
||||
ang = view_angles;
|
||||
}
|
||||
|
||||
makevectors(ang);
|
||||
traceline(src, src + (v_forward * 8096), FALSE, self);
|
||||
|
||||
if (serverkeyfloat("*bspversion") == 30) {
|
||||
dynamiclight_add(trace_endpos + (v_forward * -2), 128, [1,1,1]);
|
||||
} else {
|
||||
float p = dynamiclight_add(src, 512, [1,1,1], 0, "textures/flashlight");
|
||||
dynamiclight_set(p, LFIELD_ANGLES, ang);
|
||||
dynamiclight_set(p, LFIELD_FLAGS, 3);
|
||||
}
|
||||
}
|
||||
|
||||
/* Run animations regardless of rendering the player */
|
||||
draw();
|
||||
gun_offset();
|
||||
|
@ -152,9 +127,11 @@ player::predraw(void)
|
|||
|
||||
if (autocvar_cl_thirdperson == TRUE || this.entnum != player_localentnum) {
|
||||
Voice_Draw3D(this);
|
||||
Player_PreDraw(this, TRUE);
|
||||
addentity(this);
|
||||
addentity(this.p_model);
|
||||
} else {
|
||||
Player_PreDraw(this, FALSE);
|
||||
removeentity(this);
|
||||
removeentity(this.p_model);
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ Predict_PreFrame(player pl)
|
|||
pl.net_origin = pl.origin;
|
||||
pl.net_velocity = pl.velocity;
|
||||
pl.net_flags = pl.flags;
|
||||
pl.net_gflags = pl.gflags;
|
||||
pl.net_jumptime = pl.jumptime;
|
||||
pl.net_teleport_time = pl.teleport_time;
|
||||
pl.net_viewzoom = pl.viewzoom;
|
||||
|
@ -81,6 +82,7 @@ Predict_PostFrame(player pl)
|
|||
pl.origin = pl.net_origin;
|
||||
pl.velocity = pl.net_velocity;
|
||||
pl.flags = pl.net_flags;
|
||||
pl.gflags = pl.net_gflags;
|
||||
pl.jumptime = pl.net_jumptime;
|
||||
pl.teleport_time = pl.net_teleport_time;
|
||||
pl.viewzoom = pl.net_viewzoom;
|
||||
|
|
|
@ -301,7 +301,7 @@ HUD_DrawFlashlight(void)
|
|||
pos = g_hudmins + [g_hudres[0] - 48, 16];
|
||||
|
||||
/* both on, draw both sprites at full intensity */
|
||||
if (pl.flags & FL_FLASHLIGHT) {
|
||||
if (pl.gflags & GF_FLASHLIGHT) {
|
||||
drawsubpic(
|
||||
pos,
|
||||
[32,32],
|
||||
|
|
|
@ -14,6 +14,35 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
void
|
||||
Player_PreDraw(base_player pl, int thirdperson)
|
||||
{
|
||||
/* Handle the flashlights... */
|
||||
if (pl.gflags & GF_FLASHLIGHT) {
|
||||
vector src;
|
||||
vector ang;
|
||||
|
||||
if (pl.entnum != player_localentnum) {
|
||||
src = pl.origin + pl.view_ofs;
|
||||
ang = [pl.pitch, pl.angles[1], pl.angles[2]];
|
||||
} else {
|
||||
src = pSeat->m_vecPredictedOrigin + [0,0,-8];
|
||||
ang = view_angles;
|
||||
}
|
||||
|
||||
makevectors(ang);
|
||||
traceline(src, src + (v_forward * 8096), MOVE_NORMAL, pl);
|
||||
|
||||
if (serverkeyfloat("*bspversion") == 30) {
|
||||
dynamiclight_add(trace_endpos + (v_forward * -2), 128, [1,1,1]);
|
||||
} else {
|
||||
float p = dynamiclight_add(src, 512, [1,1,1], 0, "textures/flashlight");
|
||||
dynamiclight_set(p, LFIELD_ANGLES, ang);
|
||||
dynamiclight_set(p, LFIELD_FLAGS, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Player_ReceiveEntity(float new)
|
||||
{
|
||||
|
@ -80,8 +109,10 @@ Player_ReceiveEntity(float new)
|
|||
|
||||
if (fl & PLAYER_VELOCITY_Z)
|
||||
pl.velocity[2] = readcoord();
|
||||
if (fl & PLAYER_FLAGS)
|
||||
if (fl & PLAYER_FLAGS) {
|
||||
pl.flags = readfloat();
|
||||
pl.gflags = readfloat();
|
||||
}
|
||||
if (fl & PLAYER_WEAPON)
|
||||
pl.activeweapon = readbyte();
|
||||
if (fl & PLAYER_ITEMS)
|
||||
|
|
|
@ -401,7 +401,7 @@ CBaseEntity::CBaseEntity(void)
|
|||
}
|
||||
}
|
||||
|
||||
gflags = GF_CANRESPAWN;
|
||||
identity = 1;
|
||||
effects |= EF_NOSHADOW;
|
||||
scale = 1.0f;
|
||||
|
||||
|
|
|
@ -50,5 +50,5 @@ void
|
|||
CBaseOutput::CBaseOutput(void)
|
||||
{
|
||||
/* Make sure Respawn() will be called between rounds */
|
||||
gflags = GF_CANRESPAWN;
|
||||
identity = 1;
|
||||
}
|
||||
|
|
|
@ -210,6 +210,6 @@ void
|
|||
env_laser::env_laser(void)
|
||||
{
|
||||
CBaseTrigger::CBaseTrigger();
|
||||
gflags = GF_CANRESPAWN;
|
||||
identity = 1;
|
||||
pvsflags = PVSF_IGNOREPVS;
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ class func_door:CBaseTrigger
|
|||
void
|
||||
func_door::Use(void)
|
||||
{
|
||||
eActivator.gflags &= ~GF_USE_RELEASED;
|
||||
eActivator.flags &= ~FL_USE_RELEASED;
|
||||
Trigger(eActivator, TRIG_TOGGLE);
|
||||
}
|
||||
|
||||
|
|
|
@ -234,7 +234,7 @@ void func_door_rotating::Trigger(entity act, int state)
|
|||
|
||||
void func_door_rotating::Use(void)
|
||||
{
|
||||
eActivator.gflags &= ~GF_USE_RELEASED;
|
||||
eActivator.flags &= ~FL_USE_RELEASED;
|
||||
Trigger(eActivator, TRIG_TOGGLE);
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ void func_healthcharger::PlayerUse(void)
|
|||
return;
|
||||
}
|
||||
|
||||
eActivator.gflags |= GF_USE_RELEASED;
|
||||
eActivator.flags |= FL_USE_RELEASED;
|
||||
|
||||
/* First come first serve */
|
||||
if (m_eUser && eActivator != m_eUser) {
|
||||
|
@ -65,7 +65,7 @@ void func_healthcharger::PlayerUse(void)
|
|||
}
|
||||
|
||||
if (eActivator.health >= 100) {
|
||||
eActivator.gflags &= ~GF_USE_RELEASED;
|
||||
eActivator.flags &= ~FL_USE_RELEASED;
|
||||
sound(this, CHAN_VOICE, m_strSndDone, 1.0, ATTN_NORM);
|
||||
} else {
|
||||
if (m_eUser == world) {
|
||||
|
|
|
@ -48,7 +48,7 @@ void func_recharge::PlayerUse(void)
|
|||
return;
|
||||
}
|
||||
|
||||
eActivator.gflags |= GF_USE_RELEASED;
|
||||
eActivator.flags |= FL_USE_RELEASED;
|
||||
|
||||
/* First come first serve */
|
||||
if (m_eUser && eActivator != m_eUser) {
|
||||
|
@ -66,7 +66,7 @@ void func_recharge::PlayerUse(void)
|
|||
|
||||
base_player pl = (base_player)eActivator;
|
||||
if (pl.armor >= 100) {
|
||||
eActivator.gflags &= ~GF_USE_RELEASED;
|
||||
eActivator.flags &= ~FL_USE_RELEASED;
|
||||
sound(this, CHAN_VOICE, m_strSndDone, 1.0, ATTN_NORM);
|
||||
} else {
|
||||
if (m_eUser == world) {
|
||||
|
|
|
@ -43,7 +43,7 @@ info_null::WarnDeveloper(void)
|
|||
|
||||
for (entity f = world; (f = find(f, ::target, targetname));) {
|
||||
CBaseEntity enty = (CBaseTrigger)f;
|
||||
if (enty.gflags == GF_CANRESPAWN)
|
||||
if (enty.identity)
|
||||
if (enty.target == targetname) {
|
||||
print(sprintf("^1info_null::WarnDeveloper^7: " \
|
||||
"%s (%s) is targetting an info_null called %s\n",
|
||||
|
|
|
@ -19,9 +19,9 @@ Game_RunClientCommand(void)
|
|||
{
|
||||
player pl = (player)self;
|
||||
|
||||
pl.flags &= ~FL_BUYZONE;
|
||||
pl.flags &= ~FL_RESCUEZONE;
|
||||
pl.flags &= ~FL_BOMBZONE;
|
||||
pl.gflags &= ~GF_BUYZONE;
|
||||
pl.gflags &= ~GF_RESCUEZONE;
|
||||
pl.gflags &= ~GF_BOMBZONE;
|
||||
|
||||
Footsteps_Update();
|
||||
PMove_Run();
|
||||
|
|
|
@ -47,7 +47,7 @@ func_bomb_target::touch(void)
|
|||
return;
|
||||
}
|
||||
|
||||
pl.flags |= FL_BOMBZONE;
|
||||
pl.gflags |= GF_BOMBZONE;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -56,7 +56,7 @@ func_buyzone::touch(void)
|
|||
return;
|
||||
|
||||
if (team == 0 || team == pl.team)
|
||||
pl.flags |= FL_BUYZONE;
|
||||
pl.gflags |= GF_BUYZONE;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -41,7 +41,7 @@ func_hostage_rescue::touch(void)
|
|||
{
|
||||
if (other.flags & FL_CLIENT) {
|
||||
player pl = (player)other;
|
||||
pl.flags |= FL_RESCUEZONE;
|
||||
pl.gflags |= GF_RESCUEZONE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -77,6 +77,9 @@ CSGameRules::PlayerPostFrame(base_player pp)
|
|||
if (pl.old_flags != pl.flags)
|
||||
pl.SendFlags |= PLAYER_FLAGS;
|
||||
|
||||
if (pl.old_gflags != pl.gflags)
|
||||
pl.SendFlags |= PLAYER_FLAGS;
|
||||
|
||||
if (pl.old_activeweapon != pl.activeweapon)
|
||||
pl.SendFlags |= PLAYER_WEAPON;
|
||||
|
||||
|
@ -116,6 +119,7 @@ CSGameRules::PlayerPostFrame(base_player pp)
|
|||
pl.old_angles[0] = pl.v_angle[0];
|
||||
pl.old_velocity = pl.velocity;
|
||||
pl.old_flags = pl.flags;
|
||||
pl.old_gflags = pl.gflags;
|
||||
pl.old_activeweapon = pl.activeweapon;
|
||||
pl.old_items = pl.g_items;
|
||||
pl.old_health = pl.health;
|
||||
|
@ -188,6 +192,7 @@ CSGameRules::LevelDecodeParms(base_player pp)
|
|||
pl.g3sg1_mag = parm44;
|
||||
pl.sg550_mag = parm45;
|
||||
pl.para_mag = parm46;
|
||||
pl.gflags = parm63;
|
||||
|
||||
if (pl.flags & FL_CROUCHING) {
|
||||
setsize(pl, VEC_CHULL_MIN, VEC_CHULL_MAX);
|
||||
|
@ -209,6 +214,7 @@ CSGameRules::LevelChangeParms(base_player pp)
|
|||
parm7 = pl.velocity[0];
|
||||
parm8 = pl.velocity[1];
|
||||
parm9 = pl.velocity[2];
|
||||
parm63 = pl.gflags;
|
||||
parm64 = pl.flags;
|
||||
parm10 = pl.g_items;
|
||||
parm11 = pl.activeweapon;
|
||||
|
@ -259,7 +265,7 @@ CSGameRules::LevelNewParms(void)
|
|||
parm22 = parm23 = parm24 = parm25 = parm26 = parm27 = parm28 =
|
||||
parm29 = parm30 = parm31 = parm32 = parm33 = parm34 = parm35 =
|
||||
parm36 = parm37 = parm38 = parm39 = parm40 = parm41 = parm42 =
|
||||
parm43 = parm44 = parm45 = parm46 = 0;
|
||||
parm43 = parm44 = parm45 = parm46 = parm63= 0;
|
||||
parm64 = FL_CLIENT;
|
||||
}
|
||||
|
||||
|
@ -276,7 +282,7 @@ CSGameRules::PlayerConnect(entity pl)
|
|||
|
||||
/* we're the first. respawn all entities? */
|
||||
if (playercount == 0) {
|
||||
for (a = world; (a = findfloat(a, ::gflags, GF_CANRESPAWN));) {
|
||||
for (a = world; (a = findfloat(a, ::identity, 1));) {
|
||||
CBaseEntity caw = (CBaseEntity)a;
|
||||
caw.Respawn();
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ CSMultiplayerRules::PlayerDeath(base_player pl)
|
|||
pl.movetype = MOVETYPE_NONE;
|
||||
pl.solid = SOLID_NOT;
|
||||
pl.takedamage = DAMAGE_NO;
|
||||
pl.flags &= ~FL_FLASHLIGHT;
|
||||
pl.gflags &= ~GF_FLASHLIGHT;
|
||||
pl.armor = 0;
|
||||
pl.health = 0;
|
||||
|
||||
|
@ -374,7 +374,7 @@ CSMultiplayerRules::BuyingPossible(base_player pl)
|
|||
}
|
||||
}
|
||||
|
||||
if (!(pl.flags & FL_BUYZONE)) {
|
||||
if (!(pl.gflags & GF_BUYZONE)) {
|
||||
centerprint(pl, "Sorry, you aren't in a buyzone.\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -464,9 +464,10 @@ CSMultiplayerRules::RestartRound(int iWipe)
|
|||
}
|
||||
|
||||
// Respawn all the entities
|
||||
for (entity a = world; (a = findfloat(a, ::gflags, GF_CANRESPAWN));) {
|
||||
for (entity a = world; (a = findfloat(a, ::identity, 1));) {
|
||||
CBaseEntity caw = (CBaseEntity)a;
|
||||
caw.Respawn();
|
||||
if (caw.classname != "player")
|
||||
caw.Respawn();
|
||||
}
|
||||
|
||||
TimerBegin(autocvar_mp_freezetime, GAME_FREEZE);
|
||||
|
@ -702,8 +703,10 @@ CSMultiplayerRules::PlayerRespawn(base_player pp, int fTeam)
|
|||
pl.viewzoom = 1.0;
|
||||
pl.g_items &= ~ITEM_C4BOMB;
|
||||
|
||||
pl.origin = eSpawn.origin;
|
||||
print(sprintf("Spawnpos: %v\n", eSpawn.origin));
|
||||
pl.SetOrigin(eSpawn.origin);
|
||||
pl.angles = eSpawn.angles;
|
||||
pl.SendFlags = UPDATE_ALL;
|
||||
Client_FixAngle(pl, pl.angles);
|
||||
|
||||
switch (pl.charmodel) {
|
||||
|
|
|
@ -20,7 +20,7 @@ CSSingleplayerRules::PlayerDeath(base_player pl)
|
|||
pl.movetype = MOVETYPE_NONE;
|
||||
pl.solid = SOLID_NOT;
|
||||
pl.takedamage = DAMAGE_NO;
|
||||
pl.flags &= ~FL_FLASHLIGHT;
|
||||
pl.gflags &= ~GF_FLASHLIGHT;
|
||||
pl.armor = pl.activeweapon = pl.g_items = 0;
|
||||
|
||||
if (pl.health < -50) {
|
||||
|
|
|
@ -39,7 +39,7 @@ info_buyzone::touch(void)
|
|||
return;
|
||||
|
||||
if (team == 0 || team == pl.team)
|
||||
pl.flags |= FL_BUYZONE;
|
||||
pl.gflags |= GF_BUYZONE;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -40,7 +40,7 @@ info_hostage_rescue::touch(void)
|
|||
{
|
||||
if (other.flags & FL_CLIENT) {
|
||||
player pl = (player)other;
|
||||
pl.flags |= FL_RESCUEZONE;
|
||||
pl.gflags |= GF_RESCUEZONE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ Game_Input(void)
|
|||
|
||||
if (self.impulse == 102) {
|
||||
// Respawn all the entities
|
||||
for (entity a = world; (a = findfloat(a, ::gflags, GF_CANRESPAWN));) {
|
||||
for (entity a = world; (a = findfloat(a, ::identity, 1));) {
|
||||
CBaseEntity caw = (CBaseEntity)a;
|
||||
caw.Respawn();
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ void Player_UseDown(void)
|
|||
{
|
||||
if (self.health <= 0) {
|
||||
return;
|
||||
} else if (!(self.gflags & GF_USE_RELEASED)) {
|
||||
} else if (!(self.flags & FL_USE_RELEASED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -48,17 +48,17 @@ void Player_UseDown(void)
|
|||
traceline (vSource, vSource + (v_forward * 64), MOVE_EVERYTHING, self);
|
||||
|
||||
if (trace_ent.PlayerUse) {
|
||||
self.gflags &= ~GF_USE_RELEASED;
|
||||
self.flags &= ~FL_USE_RELEASED;
|
||||
|
||||
UseWorkaround(trace_ent);
|
||||
|
||||
/* Some entities want to support Use spamming */
|
||||
if (!(self.gflags & GF_USE_RELEASED)) {
|
||||
if (!(self.flags & FL_USE_RELEASED)) {
|
||||
sound(self, CHAN_ITEM, "common/wpn_select.wav", 0.25, ATTN_IDLE);
|
||||
}
|
||||
} else {
|
||||
sound(self, CHAN_ITEM, "common/wpn_denyselect.wav", 0.25, ATTN_IDLE);
|
||||
self.gflags &= ~GF_USE_RELEASED;
|
||||
self.flags &= ~FL_USE_RELEASED;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,8 +68,8 @@ Player_UseUp
|
|||
====================
|
||||
*/
|
||||
void Player_UseUp(void) {
|
||||
if (!(self.gflags & GF_USE_RELEASED)) {
|
||||
self.gflags |= GF_USE_RELEASED;
|
||||
if (!(self.flags & FL_USE_RELEASED)) {
|
||||
self.flags |= FL_USE_RELEASED;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,6 +118,7 @@ float Player_SendEntity(entity ePEnt, float fChanged)
|
|||
}
|
||||
if (fChanged & PLAYER_FLAGS) {
|
||||
WriteFloat(MSG_ENTITY, pl.flags);
|
||||
WriteFloat(MSG_ENTITY, pl.gflags);
|
||||
}
|
||||
if (fChanged & PLAYER_WEAPON) {
|
||||
WriteByte(MSG_ENTITY, pl.activeweapon);
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
../cstrike/server.c
|
||||
../valve/damage.c
|
||||
../valve/rules.c
|
||||
../valve/flashlight.c
|
||||
|
||||
../cstrike/input.c
|
||||
../cstrike/spawn.c
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include "vox.h"
|
||||
#include "nodes.h"
|
||||
#include "spawn.h"
|
||||
#include "flashlight.h"
|
||||
#include "weapons.h"
|
||||
#include "plugins.h"
|
||||
#include "vehicles.h"
|
||||
|
@ -61,7 +60,7 @@ entity g_eAttacker;
|
|||
.float material;
|
||||
.float deaths;
|
||||
.float fStepTime;
|
||||
.float gflags;
|
||||
.float identity;
|
||||
|
||||
/* in idTech the .owner field causes collisions to fail against set entity,
|
||||
* we don't want this all of the time. so use this as a fallback */
|
||||
|
@ -72,16 +71,6 @@ string startspot;
|
|||
string __fullspawndata;
|
||||
hashtable hashMaterials;
|
||||
|
||||
enumflags
|
||||
{
|
||||
GF_CANRESPAWN,
|
||||
GF_USE_RELEASED,
|
||||
GF_IN_VEHICLE,
|
||||
GF_FROZEN,
|
||||
GF_SEMI_TOGGLED,
|
||||
GF_GAMESTARTS
|
||||
};
|
||||
|
||||
/* damage related tempglobals, like trace_* */
|
||||
entity g_dmg_eAttacker;
|
||||
entity g_dmg_eTarget;
|
||||
|
|
|
@ -21,7 +21,7 @@ void main(void)
|
|||
|
||||
void StartFrame(void)
|
||||
{
|
||||
for (entity a = world; (a = findfloat(a, ::gflags, GF_CANRESPAWN));) {
|
||||
for (entity a = world; (a = findfloat(a, ::identity, 1));) {
|
||||
CBaseEntity ent = (CBaseEntity)a;
|
||||
ent.ParentUpdate();
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ void init_respawn(void)
|
|||
iprint("Respawning Entities");
|
||||
g_grMode.InitPostEnts();
|
||||
|
||||
for (entity a = world; (a = findfloat(a, ::gflags, GF_CANRESPAWN));) {
|
||||
for (entity a = world; (a = findfloat(a, ::identity, 1));) {
|
||||
CBaseEntity ent = (CBaseEntity)a;
|
||||
ent.Respawn();
|
||||
}
|
||||
|
|
|
@ -60,6 +60,9 @@ HLGameRules::PlayerPostFrame(base_player pp)
|
|||
if (pl.old_flags != pl.flags)
|
||||
pl.SendFlags |= PLAYER_FLAGS;
|
||||
|
||||
if (pl.old_gflags != pl.gflags)
|
||||
pl.SendFlags |= PLAYER_FLAGS;
|
||||
|
||||
if (pl.old_activeweapon != pl.activeweapon)
|
||||
pl.SendFlags |= PLAYER_WEAPON;
|
||||
|
||||
|
@ -99,6 +102,7 @@ HLGameRules::PlayerPostFrame(base_player pp)
|
|||
pl.old_angles[0] = pl.v_angle[0];
|
||||
pl.old_velocity = pl.velocity;
|
||||
pl.old_flags = pl.flags;
|
||||
pl.old_gflags = pl.gflags;
|
||||
pl.old_activeweapon = pl.activeweapon;
|
||||
pl.old_items = pl.g_items;
|
||||
pl.old_health = pl.health;
|
||||
|
@ -240,7 +244,7 @@ HLGameRules::PlayerConnect(entity pl)
|
|||
|
||||
/* we're the first. respawn all entities? */
|
||||
if (playercount == 0) {
|
||||
for (a = world; (a = findfloat(a, ::gflags, GF_CANRESPAWN));) {
|
||||
for (a = world; (a = findfloat(a, ::identity, 1));) {
|
||||
CBaseEntity caw = (CBaseEntity)a;
|
||||
caw.Respawn();
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ OP4CTFRules::PlayerDeath(base_player pp)
|
|||
pl.movetype = MOVETYPE_NONE;
|
||||
pl.solid = SOLID_NOT;
|
||||
pl.takedamage = DAMAGE_NO;
|
||||
pl.flags &= ~FL_FLASHLIGHT;
|
||||
pl.gflags &= ~GF_FLASHLIGHT;
|
||||
pl.armor = pl.activeweapon = pl.g_items = 0;
|
||||
|
||||
pl.think = PutClientInServer;
|
||||
|
|
|
@ -71,7 +71,7 @@ Game_Input(void)
|
|||
|
||||
if (self.impulse == 102) {
|
||||
// Respawn all the entities
|
||||
for (entity a = world; (a = findfloat(a, gflags, GF_CANRESPAWN));) {
|
||||
for (entity a = world; (a = findfloat(a, g::identity, 1));) {
|
||||
CBaseEntity caw = (CBaseEntity)a;
|
||||
caw.Respawn();
|
||||
}
|
||||
|
|
|
@ -83,6 +83,7 @@
|
|||
../gearbox/server.c
|
||||
../valve/damage.c
|
||||
../valve/rules.c
|
||||
../valve/flashlight.c
|
||||
|
||||
../valve/input.c
|
||||
../valve/spawn.c
|
||||
|
|
|
@ -74,7 +74,7 @@ void Game_Input(void)
|
|||
|
||||
if (self.impulse == 102) {
|
||||
// Respawn all the entities
|
||||
for (entity a = world; (a = findfloat(a, gflags, GF_CANRESPAWN));) {
|
||||
for (entity a = world; (a = findfloat(a, ::identity, 1));) {
|
||||
CBaseEntity caw = (CBaseEntity)a;
|
||||
caw.Respawn();
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@
|
|||
../valve/server.c
|
||||
../valve/damage.c
|
||||
../valve/rules.c
|
||||
../valve/flashlight.c
|
||||
|
||||
../hunger/input.c
|
||||
../valve/spawn.c
|
||||
|
|
|
@ -11,7 +11,6 @@ client.c
|
|||
server.c
|
||||
traceattack.c
|
||||
footsteps.c
|
||||
flashlight.c
|
||||
vote.c
|
||||
weapons.c
|
||||
vehicles.c
|
||||
|
|
|
@ -61,6 +61,9 @@ HLGameRules::PlayerPostFrame(base_player pp)
|
|||
if (pl.old_flags != pl.flags)
|
||||
pl.SendFlags |= PLAYER_FLAGS;
|
||||
|
||||
if (pl.old_gflags != pl.gflags)
|
||||
pl.SendFlags |= PLAYER_FLAGS;
|
||||
|
||||
if (pl.old_activeweapon != pl.activeweapon)
|
||||
pl.SendFlags |= PLAYER_WEAPON;
|
||||
|
||||
|
@ -100,6 +103,7 @@ HLGameRules::PlayerPostFrame(base_player pp)
|
|||
pl.old_angles[0] = pl.v_angle[0];
|
||||
pl.old_velocity = pl.velocity;
|
||||
pl.old_flags = pl.flags;
|
||||
pl.old_gflags = pl.gflags;
|
||||
pl.old_activeweapon = pl.activeweapon;
|
||||
pl.old_items = pl.g_items;
|
||||
pl.old_health = pl.health;
|
||||
|
@ -203,7 +207,7 @@ HLGameRules::PlayerConnect(entity pl)
|
|||
|
||||
/* we're the first. respawn all entities? */
|
||||
if (playercount == 0) {
|
||||
for (a = world; (a = findfloat(a, ::gflags, GF_CANRESPAWN));) {
|
||||
for (a = world; (a = findfloat(a, ::identity, 1));) {
|
||||
CBaseEntity caw = (CBaseEntity)a;
|
||||
caw.Respawn();
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ HLMultiplayerRules::PlayerDeath(base_player pp)
|
|||
pl.movetype = MOVETYPE_NONE;
|
||||
pl.solid = SOLID_NOT;
|
||||
pl.takedamage = DAMAGE_NO;
|
||||
pl.flags &= ~FL_FLASHLIGHT;
|
||||
pl.gflags &= ~GF_FLASHLIGHT;
|
||||
pl.armor = pl.activeweapon = pl.g_items = 0;
|
||||
|
||||
pl.think = PutClientInServer;
|
||||
|
|
|
@ -53,7 +53,7 @@ Game_Input(void)
|
|||
|
||||
if (self.impulse == 102) {
|
||||
// Respawn all the entities
|
||||
for (entity a = world; (a = findfloat(a, gflags, GF_CANRESPAWN));) {
|
||||
for (entity a = world; (a = findfloat(a, ::identity, 1));) {
|
||||
CBaseEntity caw = (CBaseEntity)a;
|
||||
caw.Respawn();
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@
|
|||
../valve/server.c
|
||||
../valve/damage.c
|
||||
../valve/rules.c
|
||||
../valve/flashlight.c
|
||||
|
||||
../poke646/input.c
|
||||
../valve/spawn.c
|
||||
|
|
|
@ -153,6 +153,9 @@ HLGameRules::PlayerPostFrame(base_player pp)
|
|||
if (pl.old_flags != pl.flags)
|
||||
pl.SendFlags |= PLAYER_FLAGS;
|
||||
|
||||
if (pl.old_gflags != pl.gflags)
|
||||
pl.SendFlags |= PLAYER_FLAGS;
|
||||
|
||||
if (pl.old_activeweapon != pl.activeweapon)
|
||||
pl.SendFlags |= PLAYER_WEAPON;
|
||||
|
||||
|
@ -192,6 +195,7 @@ HLGameRules::PlayerPostFrame(base_player pp)
|
|||
pl.old_angles[0] = pl.v_angle[0];
|
||||
pl.old_velocity = pl.velocity;
|
||||
pl.old_flags = pl.flags;
|
||||
pl.old_gflags = pl.gflags;
|
||||
pl.old_activeweapon = pl.activeweapon;
|
||||
pl.old_items = pl.g_items;
|
||||
pl.old_health = pl.health;
|
||||
|
@ -218,7 +222,7 @@ HLGameRules::PlayerConnect(entity pl)
|
|||
|
||||
/* we're the first. respawn all entities? */
|
||||
if (playercount == 0) {
|
||||
for (a = world; (a = findfloat(a, ::gflags, GF_CANRESPAWN));) {
|
||||
for (a = world; (a = findfloat(a, ::identity, 1));) {
|
||||
CBaseEntity caw = (CBaseEntity)a;
|
||||
caw.Respawn();
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ HLMultiplayerRules::PlayerDeath(base_player pp)
|
|||
pl.movetype = MOVETYPE_NONE;
|
||||
pl.solid = SOLID_NOT;
|
||||
pl.takedamage = DAMAGE_NO;
|
||||
pl.flags &= ~FL_FLASHLIGHT;
|
||||
pl.gflags &= ~GF_FLASHLIGHT;
|
||||
pl.armor = pl.activeweapon = pl.g_items = 0;
|
||||
|
||||
pl.think = PutClientInServer;
|
||||
|
|
|
@ -55,7 +55,7 @@ Game_Input(void)
|
|||
|
||||
if (self.impulse == 102) {
|
||||
// Respawn all the entities
|
||||
for (entity a = world; (a = findfloat(a, gflags, GF_CANRESPAWN));) {
|
||||
for (entity a = world; (a = findfloat(a, ::identity, 1));) {
|
||||
CBaseEntity caw = (CBaseEntity)a;
|
||||
caw.Respawn();
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
../valve/server.c
|
||||
../valve/damage.c
|
||||
../valve/rules.c
|
||||
../valve/flashlight.c
|
||||
|
||||
../rewolf/input.c
|
||||
../valve/spawn.c
|
||||
|
|
|
@ -49,7 +49,7 @@ SHMultiplayerRules::PlayerDeath(base_player pl)
|
|||
pl.movetype = MOVETYPE_NONE;
|
||||
pl.solid = SOLID_NOT;
|
||||
pl.takedamage = DAMAGE_NO;
|
||||
pl.flags &= ~FL_FLASHLIGHT;
|
||||
pl.gflags &= ~GF_FLASHLIGHT;
|
||||
pl.armor = pl.activeweapon = pl.g_items = 0;
|
||||
|
||||
pl.think = PutClientInServer;
|
||||
|
@ -265,6 +265,9 @@ SHMultiplayerRules::PlayerPostFrame(base_player pp)
|
|||
if (pl.old_flags != pl.flags)
|
||||
pl.SendFlags |= PLAYER_FLAGS;
|
||||
|
||||
if (pl.old_gflags != pl.gflags)
|
||||
pl.SendFlags |= PLAYER_FLAGS;
|
||||
|
||||
if (pl.old_activeweapon != pl.activeweapon)
|
||||
pl.SendFlags |= PLAYER_WEAPON;
|
||||
|
||||
|
@ -304,6 +307,7 @@ SHMultiplayerRules::PlayerPostFrame(base_player pp)
|
|||
pl.old_angles[0] = pl.v_angle[0];
|
||||
pl.old_velocity = pl.velocity;
|
||||
pl.old_flags = pl.flags;
|
||||
pl.old_gflags = pl.gflags;
|
||||
pl.old_activeweapon = pl.activeweapon;
|
||||
pl.old_items = pl.g_items;
|
||||
pl.old_health = pl.health;
|
||||
|
@ -341,7 +345,7 @@ SHMultiplayerRules::PlayerConnect(entity pl)
|
|||
|
||||
/* we're the first. respawn all entities? */
|
||||
if (playercount == 0) {
|
||||
for (a = world; (a = findfloat(a, ::gflags, GF_CANRESPAWN));) {
|
||||
for (a = world; (a = findfloat(a, ::identity, 1));) {
|
||||
CBaseEntity caw = (CBaseEntity)a;
|
||||
caw.Respawn();
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ void Game_Input(void)
|
|||
|
||||
if (self.impulse == 102) {
|
||||
// Respawn all the entities
|
||||
for (entity a = world; (a = findfloat(a, gflags, GF_CANRESPAWN));) {
|
||||
for (entity a = world; (a = findfloat(a, ::identity, 1));) {
|
||||
CBaseEntity caw = (CBaseEntity)a;
|
||||
caw.Respawn();
|
||||
}
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
../scihunt/server.c
|
||||
../valve/damage.c
|
||||
../valve/rules.c
|
||||
../valve/flashlight.c
|
||||
|
||||
../../botlib/include.src
|
||||
|
||||
|
|
|
@ -60,6 +60,9 @@ TFCGameRules::PlayerPostFrame(base_player pp)
|
|||
if (pl.old_flags != pl.flags)
|
||||
pl.SendFlags |= PLAYER_FLAGS;
|
||||
|
||||
if (pl.old_gflags != pl.gflags)
|
||||
pl.SendFlags |= PLAYER_FLAGS;
|
||||
|
||||
if (pl.old_activeweapon != pl.activeweapon)
|
||||
pl.SendFlags |= PLAYER_WEAPON;
|
||||
|
||||
|
@ -99,6 +102,7 @@ TFCGameRules::PlayerPostFrame(base_player pp)
|
|||
pl.old_angles[0] = pl.v_angle[0];
|
||||
pl.old_velocity = pl.velocity;
|
||||
pl.old_flags = pl.flags;
|
||||
pl.old_gflags = pl.gflags;
|
||||
pl.old_activeweapon = pl.activeweapon;
|
||||
pl.old_items = pl.g_items;
|
||||
pl.old_health = pl.health;
|
||||
|
@ -136,7 +140,7 @@ TFCGameRules::PlayerConnect(entity pl)
|
|||
|
||||
/* we're the first. respawn all entities? */
|
||||
if (playercount == 0) {
|
||||
for (a = world; (a = findfloat(a, ::gflags, GF_CANRESPAWN));) {
|
||||
for (a = world; (a = findfloat(a, ::identity, 1));) {
|
||||
CBaseEntity caw = (CBaseEntity)a;
|
||||
caw.Respawn();
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ Game_Input(void)
|
|||
player pl = (player)self;
|
||||
if (self.impulse == 102) {
|
||||
// Respawn all the entities
|
||||
for (entity a = world; (a = findfloat(a, gflags, GF_CANRESPAWN));) {
|
||||
for (entity a = world; (a = findfloat(a, ::identity, 1));) {
|
||||
CBaseEntity caw = (CBaseEntity)a;
|
||||
caw.Respawn();
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
../tfc/server.c
|
||||
../valve/damage.c
|
||||
../valve/rules.c
|
||||
../valve/flashlight.c
|
||||
|
||||
../../botlib/include.src
|
||||
|
||||
|
|
|
@ -33,10 +33,10 @@ void Flashlight_Toggle(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (self.flags & FL_FLASHLIGHT) {
|
||||
self.flags &= ~FL_FLASHLIGHT;
|
||||
if (self.gflags & GF_FLASHLIGHT) {
|
||||
self.gflags &= ~GF_FLASHLIGHT;
|
||||
} else {
|
||||
self.flags |= FL_FLASHLIGHT;
|
||||
self.gflags |= GF_FLASHLIGHT;
|
||||
}
|
||||
sound(self, CHAN_ITEM, "items/flashlight1.wav", 1, ATTN_IDLE);
|
||||
}
|
|
@ -152,6 +152,9 @@ HLGameRules::PlayerPostFrame(base_player pl)
|
|||
if (pl.old_flags != pl.flags)
|
||||
pl.SendFlags |= PLAYER_FLAGS;
|
||||
|
||||
if (pl.old_gflags != pl.gflags)
|
||||
pl.SendFlags |= PLAYER_FLAGS;
|
||||
|
||||
if (pl.old_activeweapon != pl.activeweapon)
|
||||
pl.SendFlags |= PLAYER_WEAPON;
|
||||
|
||||
|
@ -191,6 +194,7 @@ HLGameRules::PlayerPostFrame(base_player pl)
|
|||
pl.old_angles[0] = pl.v_angle[0];
|
||||
pl.old_velocity = pl.velocity;
|
||||
pl.old_flags = pl.flags;
|
||||
pl.old_gflags = pl.gflags;
|
||||
pl.old_activeweapon = pl.activeweapon;
|
||||
pl.old_items = pl.g_items;
|
||||
pl.old_health = pl.health;
|
||||
|
@ -219,7 +223,7 @@ HLGameRules::PlayerConnect(entity pl)
|
|||
|
||||
/* we're the first. respawn all entities? */
|
||||
if (playercount == 0) {
|
||||
for (a = world; (a = findfloat(a, ::gflags, GF_CANRESPAWN));) {
|
||||
for (a = world; (a = findfloat(a, ::identity, 1));) {
|
||||
CBaseEntity caw = (CBaseEntity)a;
|
||||
caw.Respawn();
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ HLMultiplayerRules::PlayerDeath(base_player pl)
|
|||
pl.movetype = MOVETYPE_NONE;
|
||||
pl.solid = SOLID_NOT;
|
||||
pl.takedamage = DAMAGE_NO;
|
||||
pl.flags &= ~FL_FLASHLIGHT;
|
||||
pl.gflags &= ~GF_FLASHLIGHT;
|
||||
pl.armor = pl.activeweapon = pl.g_items = 0;
|
||||
|
||||
pl.think = PutClientInServer;
|
||||
|
|
|
@ -20,7 +20,7 @@ HLSingleplayerRules::PlayerDeath(base_player pl)
|
|||
pl.movetype = MOVETYPE_NONE;
|
||||
pl.solid = SOLID_NOT;
|
||||
pl.takedamage = DAMAGE_NO;
|
||||
pl.flags &= ~FL_FLASHLIGHT;
|
||||
pl.gflags &= ~GF_FLASHLIGHT;
|
||||
pl.armor = pl.activeweapon = pl.g_items = pl.weapon = 0;
|
||||
pl.health = 0;
|
||||
Sound_Play(pl, CHAN_AUTO, "player.die");
|
||||
|
|
|
@ -74,7 +74,7 @@ void Game_Input(void)
|
|||
|
||||
if (self.impulse == 102) {
|
||||
// Respawn all the entities
|
||||
for (entity a = world; (a = findfloat(a, ::gflags, GF_CANRESPAWN));) {
|
||||
for (entity a = world; (a = findfloat(a, ::identity, 1));) {
|
||||
CBaseEntity caw = (CBaseEntity)a;
|
||||
caw.Respawn();
|
||||
caw.SendFlags |=
|
||||
|
|
|
@ -39,7 +39,7 @@ void Player_UseDown(void)
|
|||
|
||||
if (self.health <= 0) {
|
||||
return;
|
||||
} else if (!(self.gflags & GF_USE_RELEASED)) {
|
||||
} else if (!(self.flags & FL_USE_RELEASED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -48,17 +48,17 @@ void Player_UseDown(void)
|
|||
traceline(vecSrc, vecSrc + (v_forward * 64), MOVE_NORMAL, self);
|
||||
|
||||
if (trace_ent.PlayerUse) {
|
||||
self.gflags &= ~GF_USE_RELEASED;
|
||||
self.flags &= ~FL_USE_RELEASED;
|
||||
|
||||
UseWorkaround(trace_ent);
|
||||
|
||||
/* Some entities want to support Use spamming */
|
||||
if (!(self.gflags & GF_USE_RELEASED)) {
|
||||
if (!(self.flags & FL_USE_RELEASED)) {
|
||||
sound(self, CHAN_ITEM, "common/wpn_select.wav", 0.25, ATTN_IDLE);
|
||||
}
|
||||
} else {
|
||||
sound(self, CHAN_ITEM, "common/wpn_denyselect.wav", 0.25, ATTN_IDLE);
|
||||
self.gflags &= ~GF_USE_RELEASED;
|
||||
self.flags &= ~FL_USE_RELEASED;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,8 +68,8 @@ Player_UseUp
|
|||
====================
|
||||
*/
|
||||
void Player_UseUp(void) {
|
||||
if (!(self.gflags & GF_USE_RELEASED)) {
|
||||
self.gflags |= GF_USE_RELEASED;
|
||||
if (!(self.flags & FL_USE_RELEASED)) {
|
||||
self.flags |= FL_USE_RELEASED;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,6 +118,7 @@ float Player_SendEntity(entity ePEnt, float fChanged)
|
|||
}
|
||||
if (fChanged & PLAYER_FLAGS) {
|
||||
WriteFloat(MSG_ENTITY, pl.flags);
|
||||
WriteFloat(MSG_ENTITY, pl.gflags);
|
||||
}
|
||||
if (fChanged & PLAYER_WEAPON) {
|
||||
WriteByte(MSG_ENTITY, pl.activeweapon);
|
||||
|
|
|
@ -78,6 +78,7 @@
|
|||
../valve/server.c
|
||||
../valve/damage.c
|
||||
../valve/rules.c
|
||||
../valve/flashlight.c
|
||||
|
||||
../valve/input.c
|
||||
../valve/spawn.c
|
||||
|
|
|
@ -42,7 +42,7 @@ Weapons_SwitchBest(base_player pl)
|
|||
}
|
||||
Weapons_Draw();
|
||||
self = oldself;
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
}
|
||||
|
||||
/* returns TRUE if weapon pickup gets removed from this world */
|
||||
|
|
|
@ -23,10 +23,6 @@
|
|||
#define TEAM_CT 2
|
||||
#define TEAM_VIP 3
|
||||
|
||||
#define FL_BUYZONE (1<<21)
|
||||
#define FL_RESCUEZONE (1<<22)
|
||||
#define FL_BOMBZONE (1<<23)
|
||||
|
||||
enum
|
||||
{
|
||||
STAT_MONEY = 34,
|
||||
|
|
40
src/shared/cstrike/flags.h
Normal file
40
src/shared/cstrike/flags.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* game flags */
|
||||
#define GF_SEMI_TOGGLED (1<<0)
|
||||
#define GF_FLASHLIGHT (1<<1)
|
||||
#define GF_BUYZONE (1<<2)
|
||||
#define GF_RESCUEZONE (1<<3)
|
||||
#define GF_BOMBZONE (1<<4)
|
||||
#define GF_UNUSED6 (1<<5)
|
||||
#define GF_UNUSED7 (1<<6)
|
||||
#define GF_UNUSED8 (1<<7)
|
||||
#define GF_UNUSED9 (1<<8)
|
||||
#define GF_UNUSED10 (1<<9)
|
||||
#define GF_UNUSED11 (1<<10)
|
||||
#define GF_UNUSED12 (1<<11)
|
||||
#define GF_UNUSED13 (1<<12)
|
||||
#define GF_UNUSED14 (1<<14)
|
||||
#define GF_UNUSED15 (1<<16)
|
||||
#define GF_UNUSED16 (1<<13)
|
||||
#define GF_UNUSED17 (1<<17)
|
||||
#define GF_UNUSED18 (1<<18)
|
||||
#define GF_UNUSED19 (1<<19)
|
||||
#define GF_UNUSED20 (1<<20)
|
||||
#define GF_UNUSED21 (1<<21)
|
||||
#define GF_UNUSED22 (1<<22)
|
||||
#define GF_UNUSED23 (1<<23)
|
|
@ -1,5 +1,6 @@
|
|||
#includelist
|
||||
../../shared/cstrike/defs.h
|
||||
../../shared/cstrike/flags.h
|
||||
../../shared/sound.c
|
||||
../../shared/cstrike/animations.h
|
||||
../../shared/cstrike/animations.c
|
||||
|
|
|
@ -27,7 +27,6 @@ class player:base_player
|
|||
int playertype;
|
||||
int p_hand_bone;
|
||||
int p_model_bone;
|
||||
float pitch;
|
||||
float lastweapon;
|
||||
|
||||
int cs_cross_mindist;
|
||||
|
|
|
@ -132,7 +132,7 @@ w_c4bomb_primary(void)
|
|||
{
|
||||
player pl = (player)self;
|
||||
|
||||
if (!(pl.flags & FL_BOMBZONE)) {
|
||||
if (!(pl.gflags & GF_BOMBZONE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ w_deagle_primary(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (pl.flags & FL_SEMI_TOGGLED) {
|
||||
if (pl.gflags & GF_SEMI_TOGGLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ w_deagle_primary(void)
|
|||
}
|
||||
}
|
||||
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
pl.w_attack_next = 0.15f;
|
||||
pl.w_idle_next = pl.w_attack_next;
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ w_elites_primary(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (pl.flags & FL_SEMI_TOGGLED) {
|
||||
if (pl.gflags & GF_SEMI_TOGGLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -216,7 +216,7 @@ w_elites_primary(void)
|
|||
}
|
||||
}
|
||||
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
pl.w_attack_next = 0.15f;
|
||||
pl.w_idle_next = pl.w_attack_next;
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ w_fiveseven_primary(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (pl.flags & FL_SEMI_TOGGLED) {
|
||||
if (pl.gflags & GF_SEMI_TOGGLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ w_fiveseven_primary(void)
|
|||
}
|
||||
}
|
||||
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
pl.w_attack_next = 0.15f;
|
||||
pl.w_idle_next = pl.w_attack_next;
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ w_glock18_primary(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (pl.flags & FL_SEMI_TOGGLED) {
|
||||
if (pl.gflags & GF_SEMI_TOGGLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,7 @@ w_glock18_primary(void)
|
|||
}
|
||||
pl.w_attack_next = 0.15f;
|
||||
}
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
pl.w_idle_next = pl.w_attack_next;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ w_p228_primary(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (pl.flags & FL_SEMI_TOGGLED) {
|
||||
if (pl.gflags & GF_SEMI_TOGGLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -170,7 +170,7 @@ w_p228_primary(void)
|
|||
}
|
||||
}
|
||||
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
pl.w_attack_next = 0.15f;
|
||||
pl.w_idle_next = pl.w_attack_next;
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ w_usp45_primary(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (pl.flags & FL_SEMI_TOGGLED) {
|
||||
if (pl.gflags & GF_SEMI_TOGGLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -218,7 +218,7 @@ w_usp45_primary(void)
|
|||
}
|
||||
}
|
||||
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
pl.w_attack_next = 0.15f;
|
||||
pl.w_idle_next = pl.w_attack_next;
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ const vector VEC_PLAYER_CVIEWPOS = [0,0,12];
|
|||
.float jumptime;
|
||||
.float teleport_time;
|
||||
.vector basevelocity;
|
||||
.float gflags;
|
||||
|
||||
void*
|
||||
memrealloc(__variant *oldptr, int elementsize, int oldelements, int newelements)
|
||||
|
|
|
@ -33,35 +33,11 @@
|
|||
|
||||
/* nuclide */
|
||||
#define FL_ONLADDER (1<<13)
|
||||
#define FL_FLASHLIGHT (1<<17)
|
||||
#define FL_CROUCHING (1<<18)
|
||||
#define FL_SEMI_TOGGLED (1<<19)
|
||||
#define FL_FROZEN (1<<20)
|
||||
#define FL_RESERVED1 (1<<21)
|
||||
#define FL_RESERVED2 (1<<22)
|
||||
#define FL_RESERVED3 (1<<23)
|
||||
|
||||
/* game flags */
|
||||
#define GF_UNUSED1 (1<<0)
|
||||
#define GF_UNUSED2 (1<<1)
|
||||
#define GF_UNUSED3 (1<<2)
|
||||
#define GF_UNUSED4 (1<<3)
|
||||
#define GF_UNUSED5 (1<<4)
|
||||
#define GF_UNUSED6 (1<<5)
|
||||
#define GF_UNUSED7 (1<<6)
|
||||
#define GF_UNUSED8 (1<<7)
|
||||
#define GF_UNUSED9 (1<<8)
|
||||
#define GF_UNUSED10 (1<<9)
|
||||
#define GF_UNUSED11 (1<<10)
|
||||
#define GF_UNUSED12 (1<<11)
|
||||
#define GF_UNUSED13 (1<<12)
|
||||
#define GF_UNUSED14 (1<<14)
|
||||
#define GF_UNUSED15 (1<<16)
|
||||
#define GF_UNUSED16 (1<<13)
|
||||
#define GF_UNUSED17 (1<<17)
|
||||
#define GF_UNUSED18 (1<<18)
|
||||
#define GF_UNUSED19 (1<<19)
|
||||
#define GF_UNUSED20 (1<<20)
|
||||
#define GF_UNUSED21 (1<<21)
|
||||
#define GF_UNUSED22 (1<<22)
|
||||
#define GF_UNUSED23 (1<<23)
|
||||
#define FL_CROUCHING (1<<17)
|
||||
#define FL_INVEHICLE (1<<18)
|
||||
#define FL_FROZEN (1<<19)
|
||||
#define FL_USE_RELEASED (1<<20)
|
||||
#define FL_RESERVED1 (1<<15)
|
||||
#define FL_RESERVED2 (1<<21)
|
||||
#define FL_RESERVED3 (1<<22)
|
||||
#define FL_RESERVED4 (1<<23)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#includelist
|
||||
../../shared/valve/flags.h
|
||||
../../shared/sound.c
|
||||
../../shared/gearbox/player.cpp
|
||||
../../shared/valve/weapon_common.h
|
||||
|
|
|
@ -23,7 +23,6 @@ class player:base_player
|
|||
entity p_model;
|
||||
int p_hand_bone;
|
||||
int p_model_bone;
|
||||
float pitch;
|
||||
float lastweapon;
|
||||
|
||||
virtual void(void) gun_offset;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#includelist
|
||||
../../shared/valve/flags.h
|
||||
../../shared/sound.c
|
||||
../../shared/hunger/player.cpp
|
||||
../../shared/valve/weapon_common.h
|
||||
|
|
|
@ -22,7 +22,6 @@ class player:base_player
|
|||
entity p_model;
|
||||
int p_hand_bone;
|
||||
int p_model_bone;
|
||||
float pitch;
|
||||
float lastweapon;
|
||||
virtual void(void) gun_offset;
|
||||
virtual void(void) draw;
|
||||
|
|
|
@ -41,6 +41,7 @@ class base_player
|
|||
vector net_origin;
|
||||
vector net_velocity;
|
||||
float net_flags;
|
||||
float net_gflags;
|
||||
float net_w_attack_next;
|
||||
float net_w_idle_next;
|
||||
float net_jumptime;
|
||||
|
@ -52,6 +53,7 @@ class base_player
|
|||
int net_ammo2;
|
||||
int net_ammo3;
|
||||
int sequence;
|
||||
float pitch;
|
||||
#else
|
||||
|
||||
/* conditional networking */
|
||||
|
@ -60,6 +62,7 @@ class base_player
|
|||
vector old_angles;
|
||||
vector old_velocity;
|
||||
int old_flags;
|
||||
int old_gflags;
|
||||
int old_activeweapon;
|
||||
int old_items;
|
||||
float old_health;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#includelist
|
||||
../../shared/valve/flags.h
|
||||
../../shared/sound.c
|
||||
../../shared/poke646/player.cpp
|
||||
../../shared/valve/weapon_common.h
|
||||
|
|
|
@ -26,7 +26,6 @@ class player:base_player
|
|||
entity p_model;
|
||||
int p_hand_bone;
|
||||
int p_model_bone;
|
||||
float pitch;
|
||||
float lastweapon;
|
||||
|
||||
virtual void(void) gun_offset;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#includelist
|
||||
../../shared/valve/flags.h
|
||||
../../shared/sound.c
|
||||
../../shared/rewolf/player.cpp
|
||||
../../shared/valve/weapon_common.h
|
||||
|
|
|
@ -23,7 +23,6 @@ class player:base_player
|
|||
entity p_model;
|
||||
int p_hand_bone;
|
||||
int p_model_bone;
|
||||
float pitch;
|
||||
float lastweapon;
|
||||
|
||||
virtual void(void) gun_offset;
|
||||
|
|
|
@ -58,7 +58,7 @@ w_aicore_release(void)
|
|||
{
|
||||
player pl = (player)self;
|
||||
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
|
||||
if (pl.w_idle_next) {
|
||||
return;
|
||||
|
|
|
@ -58,13 +58,13 @@ w_beamgun_primary(void)
|
|||
vector src;
|
||||
player pl = (player)self;
|
||||
|
||||
if (pl.flags & FL_SEMI_TOGGLED) {
|
||||
if (pl.gflags & GF_SEMI_TOGGLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pl.a_ammo1 > 0) {
|
||||
pl.a_ammo1 = 0;
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
Weapons_ViewAnimation(BEAMGUN_CONFIG);
|
||||
pl.w_attack_next = 2.26087f;
|
||||
pl.w_idle_next = 2.26087f;
|
||||
|
@ -90,11 +90,11 @@ w_beamgun_secondary(void)
|
|||
{
|
||||
player pl = (player)self;
|
||||
|
||||
if (pl.flags & FL_SEMI_TOGGLED) {
|
||||
if (pl.gflags & GF_SEMI_TOGGLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
|
||||
if (pl.w_attack_next) {
|
||||
return;
|
||||
|
|
|
@ -43,13 +43,13 @@ w_chemicalgun_primary(void)
|
|||
vector src;
|
||||
player pl = (player)self;
|
||||
|
||||
if (pl.flags & FL_SEMI_TOGGLED) {
|
||||
if (pl.gflags & GF_SEMI_TOGGLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pl.a_ammo1 > 0) {
|
||||
pl.a_ammo1 = 0;
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
Weapons_ViewAnimation(CHEMGUN_CONFIG);
|
||||
pl.w_attack_next = 2.08f;
|
||||
pl.w_idle_next = pl.w_attack_next;
|
||||
|
@ -75,11 +75,11 @@ w_chemicalgun_secondary(void)
|
|||
{
|
||||
player pl = (player)self;
|
||||
|
||||
if (pl.flags & FL_SEMI_TOGGLED) {
|
||||
if (pl.gflags & GF_SEMI_TOGGLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
|
||||
if (pl.w_attack_next) {
|
||||
return;
|
||||
|
|
|
@ -131,13 +131,13 @@ w_dml_primary(void)
|
|||
vector src;
|
||||
player pl = (player)self;
|
||||
|
||||
if (pl.flags & FL_SEMI_TOGGLED) {
|
||||
if (pl.gflags & GF_SEMI_TOGGLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pl.a_ammo1 > 0) {
|
||||
pl.a_ammo1 = 0;
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
Weapons_ViewAnimation(DML_CUSTOMIZE);
|
||||
#ifdef SERVER
|
||||
Sound_Play(pl, 8, "weapon_dml.customize");
|
||||
|
@ -173,11 +173,11 @@ w_dml_secondary(void)
|
|||
{
|
||||
player pl = (player)self;
|
||||
|
||||
if (pl.flags & FL_SEMI_TOGGLED) {
|
||||
if (pl.gflags & GF_SEMI_TOGGLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
|
||||
if (pl.w_attack_next) {
|
||||
return;
|
||||
|
|
|
@ -84,13 +84,13 @@ w_gausspistol_primary(void)
|
|||
int take = 1;
|
||||
player pl = (player)self;
|
||||
|
||||
if (pl.flags & FL_SEMI_TOGGLED) {
|
||||
if (pl.gflags & GF_SEMI_TOGGLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pl.a_ammo1 > 0) {
|
||||
pl.a_ammo1 = 0;
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ w_gausspistol_primary(void)
|
|||
pl.w_idle_next = 5.0f;
|
||||
break;
|
||||
default:
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
Weapons_ViewAnimation(GP_FIRESINGLE);
|
||||
#ifdef SERVER
|
||||
Sound_Play(pl, CHAN_WEAPON, "weapon_gausspistol.firesingle");
|
||||
|
@ -153,11 +153,11 @@ w_gausspistol_secondary(void)
|
|||
{
|
||||
player pl = (player)self;
|
||||
|
||||
if (pl.flags & FL_SEMI_TOGGLED) {
|
||||
if (pl.gflags & GF_SEMI_TOGGLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
|
||||
/* activate menu */
|
||||
pl.a_ammo1 = 1;
|
||||
|
|
|
@ -45,13 +45,13 @@ w_grenade_primary(void)
|
|||
vector src;
|
||||
player pl = (player)self;
|
||||
|
||||
if (pl.flags & FL_SEMI_TOGGLED) {
|
||||
if (pl.gflags & GF_SEMI_TOGGLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pl.a_ammo1 > 0) {
|
||||
pl.a_ammo1 = 0;
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
Weapons_ViewAnimation(GREN_FIDGET);
|
||||
pl.w_attack_next = 1.2f;
|
||||
pl.w_idle_next = pl.w_attack_next;
|
||||
|
@ -77,11 +77,11 @@ w_grenade_secondary(void)
|
|||
{
|
||||
player pl = (player)self;
|
||||
|
||||
if (pl.flags & FL_SEMI_TOGGLED) {
|
||||
if (pl.gflags & GF_SEMI_TOGGLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
|
||||
if (pl.w_attack_next) {
|
||||
return;
|
||||
|
|
|
@ -68,13 +68,13 @@ w_shotgun_primary(void)
|
|||
vector src;
|
||||
player pl = (player)self;
|
||||
|
||||
if (pl.flags & FL_SEMI_TOGGLED) {
|
||||
if (pl.gflags & GF_SEMI_TOGGLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pl.a_ammo1 > 0) {
|
||||
pl.a_ammo1 = 0;
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
Weapons_ViewAnimation(SHOTGUN_CUSTOMIZE);
|
||||
pl.w_attack_next = 2.25f;
|
||||
pl.w_idle_next = 2.25f;
|
||||
|
@ -141,7 +141,7 @@ w_shotgun_secondary(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (pl.flags & FL_SEMI_TOGGLED) {
|
||||
if (pl.gflags & GF_SEMI_TOGGLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ w_shotgun_secondary(void)
|
|||
}
|
||||
}
|
||||
|
||||
pl.flags |= FL_SEMI_TOGGLED;
|
||||
pl.gflags |= GF_SEMI_TOGGLED;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#includelist
|
||||
../../shared/valve/flags.h
|
||||
../../shared/sound.c
|
||||
../../shared/scihunt/player.cpp
|
||||
../../shared/valve/weapon_common.h
|
||||
|
|
|
@ -24,7 +24,6 @@ class player:base_player
|
|||
int playertype;
|
||||
int p_hand_bone;
|
||||
int p_model_bone;
|
||||
float pitch;
|
||||
float lastweapon;
|
||||
|
||||
virtual void(void) gun_offset;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#includelist
|
||||
../../shared/valve/flags.h
|
||||
../../shared/sound.c
|
||||
../../shared/valve/player.cpp
|
||||
../../shared/valve/weapon_common.h
|
||||
|
|
|
@ -14,4 +14,27 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
void Flashlight_Toggle(void);
|
||||
/* game flags */
|
||||
#define GF_SEMI_TOGGLED (1<<0)
|
||||
#define GF_FLASHLIGHT (1<<1)
|
||||
#define GF_UNUSED3 (1<<2)
|
||||
#define GF_UNUSED4 (1<<3)
|
||||
#define GF_UNUSED5 (1<<4)
|
||||
#define GF_UNUSED6 (1<<5)
|
||||
#define GF_UNUSED7 (1<<6)
|
||||
#define GF_UNUSED8 (1<<7)
|
||||
#define GF_UNUSED9 (1<<8)
|
||||
#define GF_UNUSED10 (1<<9)
|
||||
#define GF_UNUSED11 (1<<10)
|
||||
#define GF_UNUSED12 (1<<11)
|
||||
#define GF_UNUSED13 (1<<12)
|
||||
#define GF_UNUSED14 (1<<14)
|
||||
#define GF_UNUSED15 (1<<16)
|
||||
#define GF_UNUSED16 (1<<13)
|
||||
#define GF_UNUSED17 (1<<17)
|
||||
#define GF_UNUSED18 (1<<18)
|
||||
#define GF_UNUSED19 (1<<19)
|
||||
#define GF_UNUSED20 (1<<20)
|
||||
#define GF_UNUSED21 (1<<21)
|
||||
#define GF_UNUSED22 (1<<22)
|
||||
#define GF_UNUSED23 (1<<23)
|
|
@ -1,4 +1,5 @@
|
|||
#includelist
|
||||
../../shared/valve/flags.h
|
||||
../../shared/sound.c
|
||||
../../shared/valve/player.cpp
|
||||
../../shared/valve/weapon_common.h
|
||||
|
|
|
@ -22,7 +22,6 @@ class player:base_player
|
|||
entity p_model;
|
||||
int p_hand_bone;
|
||||
int p_model_bone;
|
||||
float pitch;
|
||||
float lastweapon;
|
||||
|
||||
virtual void(void) gun_offset;
|
||||
|
|
|
@ -150,7 +150,7 @@ void Weapons_Release(void)
|
|||
g_weapons[i].release();
|
||||
}
|
||||
|
||||
pl.flags &= ~FL_SEMI_TOGGLED;
|
||||
pl.gflags &= ~GF_SEMI_TOGGLED;
|
||||
}
|
||||
|
||||
void Weapons_DrawCrosshair(void)
|
||||
|
|
Loading…
Reference in a new issue