Rebase against Nuclide, stub weapons
This commit is contained in:
parent
1152939d93
commit
f2c1d92fba
77 changed files with 1334 additions and 551 deletions
1
PROJECT
Normal file
1
PROJECT
Normal file
|
@ -0,0 +1 @@
|
||||||
|
TeamContest
|
|
@ -1,4 +1,4 @@
|
||||||
# FreeTFC
|
# Team Contest (FreeTFC)
|
||||||
Clean-room reimplementation of Team Fortress Classic in QuakeC.
|
Clean-room reimplementation of Team Fortress Classic in QuakeC.
|
||||||
|
|
||||||

|

|
||||||
|
|
26
radiant.game
Normal file
26
radiant.game
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<game
|
||||||
|
type="hl"
|
||||||
|
name="Team Fortress Classic"
|
||||||
|
enginepath_linux="/usr/local/games/halflife/"
|
||||||
|
enginepath_win32="c:/sierra/half-life/"
|
||||||
|
engine_win32="hl.exe"
|
||||||
|
engine_linux="hl_linux"
|
||||||
|
basegame="tfc"
|
||||||
|
basegamename="Team Fortress Classic"
|
||||||
|
unknowngamename="Custom Team Fortress Classic modification"
|
||||||
|
default_scale="1.0"
|
||||||
|
no_patch="1"
|
||||||
|
no_bsp_monitor="1"
|
||||||
|
show_wads="1"
|
||||||
|
archivetypes="pak wad"
|
||||||
|
texturetypes="tga jpg mip hlw"
|
||||||
|
modeltypes="mdl"
|
||||||
|
maptypes="mapq1"
|
||||||
|
shaders="quake3"
|
||||||
|
entityclass="quake3"
|
||||||
|
entityclasstype="def xml"
|
||||||
|
entities="quake3"
|
||||||
|
brushtypes="quake"
|
||||||
|
patchtypes="quake3"
|
||||||
|
/>
|
76
radiant.xml
Normal file
76
radiant.xml
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
to avoid naming conflicts, the tools are assumed to be named 'hlcsg', 'hlbsp', 'hlvis' and 'hlrad' in your path
|
||||||
|
-->
|
||||||
|
<project version="2.0">
|
||||||
|
<var name="csg">"hlcsg"</var>
|
||||||
|
<var name="bsp">"hlbsp"</var>
|
||||||
|
<var name="vis">"hlvis"</var>
|
||||||
|
<var name="light">"hlrad"</var>
|
||||||
|
|
||||||
|
<var name="qbsp">qbsp -hlbsp -basedir "[EnginePath]" -gamedir "[GameName]" -path "[UserEnginePath]"</var>
|
||||||
|
<var name="qvis">qvis -basedir "[EnginePath]" -gamedir "[GameName]" -path "[UserEnginePath]"</var>
|
||||||
|
<var name="qlight">qlight -basedir "[EnginePath]" -gamedir "[GameName]" -path "[UserEnginePath]"</var>
|
||||||
|
|
||||||
|
<build name="extra fidelity">
|
||||||
|
<command>[csg] "[MapFile]"</command>
|
||||||
|
<command>[bsp] "[MapFile]"</command>
|
||||||
|
<command>[vis] -full "[MapFile]"</command>
|
||||||
|
<command>[light] -extra "[MapFile]"</command>
|
||||||
|
</build>
|
||||||
|
<build name="standard fidelity">
|
||||||
|
<command>[csg] "[MapFile]"</command>
|
||||||
|
<command>[bsp] "[MapFile]"</command>
|
||||||
|
<command>[vis] "[MapFile]"</command>
|
||||||
|
<command>[light] "[MapFile]"</command>
|
||||||
|
</build>
|
||||||
|
<build name="quick compile">
|
||||||
|
<command>[csg] "[MapFile]"</command>
|
||||||
|
<command>[bsp] "[MapFile]"</command>
|
||||||
|
<command>[vis] -fast "[MapFile]"</command>
|
||||||
|
<command>[light] -fast "[MapFile]"</command>
|
||||||
|
</build>
|
||||||
|
<build name="fast vis only">
|
||||||
|
<command>[csg] "[MapFile]"</command>
|
||||||
|
<command>[bsp] "[MapFile]"</command>
|
||||||
|
<command>[vis] -fast "[MapFile]"</command>
|
||||||
|
</build>
|
||||||
|
<build name="no vis, no lighting">
|
||||||
|
<command>[csg] "[MapFile]"</command>
|
||||||
|
<command>[bsp] "[MapFile]"</command>
|
||||||
|
</build>
|
||||||
|
<build name="only entities">
|
||||||
|
<command>[csg] -onlyents "[MapFile]"</command>
|
||||||
|
<command>[bsp]"[MapFile]"</command>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
in case you want to use free-software tools
|
||||||
|
-->
|
||||||
|
<build name="tyrutils extra fidelity">
|
||||||
|
<command>[qbsp] "[MapFile]"</command>
|
||||||
|
<command>[qvis] "[MapFile]"</command>
|
||||||
|
<command>[qlight] -extra "[MapFile]"</command>
|
||||||
|
</build>
|
||||||
|
<build name="tyrutils standard fidelity">
|
||||||
|
<command>[qbsp] "[MapFile]"</command>
|
||||||
|
<command>[qvis] "[MapFile]"</command>
|
||||||
|
<command>[qlight] "[MapFile]"</command>
|
||||||
|
</build>
|
||||||
|
<build name="tyrutils quick compile">
|
||||||
|
<command>[qbsp] "[MapFile]"</command>
|
||||||
|
<command>[qvis] -fast "[MapFile]"</command>
|
||||||
|
<command>[qlight] -fast "[MapFile]"</command>
|
||||||
|
</build>
|
||||||
|
<build name="tyrutils fast vis only">
|
||||||
|
<command>[qbsp] "[MapFile]"</command>
|
||||||
|
<command>[qvis] -fast "[MapFile]"</command>
|
||||||
|
</build>
|
||||||
|
<build name="tyrutils no vis, no lighting">
|
||||||
|
<command>[qbsp] "[MapFile]"</command>
|
||||||
|
</build>
|
||||||
|
<build name="tyrutils only entities">
|
||||||
|
<command>[qbsp] -onlyents "[MapFile]"</command>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
CC=fteqcc
|
QCC=fteqcc
|
||||||
|
|
||||||
all:
|
all:
|
||||||
$(CC) progs.src
|
$(QCC) progs.src
|
||||||
|
|
|
@ -16,9 +16,12 @@
|
||||||
|
|
||||||
void VGUI_ChooseClass(void);
|
void VGUI_ChooseClass(void);
|
||||||
|
|
||||||
int
|
bool
|
||||||
ClientGame_ConsoleCommand(void)
|
ClientGame_ConsoleCommand(void)
|
||||||
{
|
{
|
||||||
|
int s = (int)getproperty(VF_ACTIVESEAT);
|
||||||
|
pSeatTFC = &g_seats_tfc[s];
|
||||||
|
|
||||||
switch(argv(0)) {
|
switch(argv(0)) {
|
||||||
case "build":
|
case "build":
|
||||||
sendevent("TFCBuild", "i", stoi(argv(1)));
|
sendevent("TFCBuild", "i", stoi(argv(1)));
|
||||||
|
@ -34,21 +37,30 @@ ClientGame_ConsoleCommand(void)
|
||||||
case "changeteam":
|
case "changeteam":
|
||||||
VGUI_ChooseTeam();
|
VGUI_ChooseTeam();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "+gren1":
|
case "+gren1":
|
||||||
pSeat->m_iInputExtra1 = TRUE;
|
pSeatTFC->m_bInputGren1 = true;
|
||||||
break;
|
break;
|
||||||
case "-gren1":
|
case "-gren1":
|
||||||
pSeat->m_iInputExtra1 = FALSE;
|
pSeatTFC->m_bInputGren1 = false;
|
||||||
break;
|
break;
|
||||||
case "+gren2":
|
case "+gren2":
|
||||||
pSeat->m_iInputExtra2 = TRUE;
|
pSeatTFC->m_bInputGren2 = true;
|
||||||
break;
|
break;
|
||||||
case "-gren2":
|
case "-gren2":
|
||||||
pSeat->m_iInputExtra2 = FALSE;
|
pSeatTFC->m_bInputGren2 = false;
|
||||||
|
break;
|
||||||
|
/* stubbed out, so they won't get forwarded to Nuclide */
|
||||||
|
case "goprone":
|
||||||
|
case "gocrouch":
|
||||||
|
case "+prone":
|
||||||
|
case "-prone":
|
||||||
|
case "+gostand":
|
||||||
|
case "-gostand":
|
||||||
|
case "+sprint":
|
||||||
|
case "-sprint":
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return (0);
|
return (false);
|
||||||
}
|
}
|
||||||
return (1);
|
return (true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,5 +28,10 @@ var string g_tfchud7_spr;
|
||||||
|
|
||||||
var int MUZZLE_ROUND;
|
var int MUZZLE_ROUND;
|
||||||
|
|
||||||
|
void TFCHallucination_Insert(vector, vector);
|
||||||
|
|
||||||
void TFCHallucination_Insert(vector, vector);
|
struct
|
||||||
|
{
|
||||||
|
bool m_bInputGren1;
|
||||||
|
bool m_bInputGren2;
|
||||||
|
} g_seats_tfc[4], *pSeatTFC;
|
|
@ -42,7 +42,7 @@ ClientGame_PreDraw(void)
|
||||||
void
|
void
|
||||||
ClientGame_PostDraw(void)
|
ClientGame_PostDraw(void)
|
||||||
{
|
{
|
||||||
player pl = (player)pSeat->m_ePlayer;
|
TFPlayer pl = (TFPlayer)pSeat->m_ePlayer;
|
||||||
|
|
||||||
if (serverkeyfloat("areadefs") == 1) {
|
if (serverkeyfloat("areadefs") == 1) {
|
||||||
string strArea = getplayerkeyvalue(player_localnum, "*areadef");
|
string strArea = getplayerkeyvalue(player_localnum, "*areadef");
|
||||||
|
|
|
@ -18,6 +18,9 @@ int
|
||||||
ClientGame_EntityUpdate(float id, float new)
|
ClientGame_EntityUpdate(float id, float new)
|
||||||
{
|
{
|
||||||
switch (id) {
|
switch (id) {
|
||||||
|
case ENT_PLAYER:
|
||||||
|
NSENTITY_READENTITY(TFPlayer, new)
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,10 +76,10 @@ HUD_AmmoNotify_Insert(int type, int count)
|
||||||
|
|
||||||
/* called whenever we should check for pickup updates */
|
/* called whenever we should check for pickup updates */
|
||||||
void
|
void
|
||||||
HUD_AmmoNotify_Check(player pl)
|
HUD_AmmoNotify_Check(NSClientPlayer pl)
|
||||||
{
|
{
|
||||||
HUD_AmmoNotify_Insert(0, pl.m_iAmmoRockets - pl.m_iAmmoRockets_net);
|
HUD_AmmoNotify_Insert(0, pl.m_iAmmoTypes[1] - pl.m_iAmmoTypes_net[1]);
|
||||||
HUD_AmmoNotify_Insert(1, pl.m_iAmmoNails - pl.m_iAmmoNails_net);
|
HUD_AmmoNotify_Insert(1, pl.m_iAmmoTypes[2] - pl.m_iAmmoTypes_net[2]);
|
||||||
HUD_AmmoNotify_Insert(2, pl.m_iAmmoCells - pl.m_iAmmoCells_net);
|
HUD_AmmoNotify_Insert(2, pl.m_iAmmoTypes[3] - pl.m_iAmmoTypes_net[3]);
|
||||||
HUD_AmmoNotify_Insert(3, pl.m_iAmmoShells - pl.m_iAmmoShells_net);
|
HUD_AmmoNotify_Insert(3, pl.m_iAmmoTypes[4] - pl.m_iAmmoTypes_net[4]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ HUD_ItemNotify_Insert(int type, int count)
|
||||||
|
|
||||||
/* called whenever we should check for pickup updates */
|
/* called whenever we should check for pickup updates */
|
||||||
void
|
void
|
||||||
HUD_ItemNotify_Check(player pl)
|
HUD_ItemNotify_Check(NSClientPlayer pl)
|
||||||
{
|
{
|
||||||
int healthdiff = bound(0, pl.health - pl.health_net, 100);
|
int healthdiff = bound(0, pl.health - pl.health_net, 100);
|
||||||
int armordiff = bound(0, pl.armor - pl.armor_net, 100);
|
int armordiff = bound(0, pl.armor - pl.armor_net, 100);
|
||||||
|
|
|
@ -35,6 +35,8 @@ ClientGame_Init(float apilevel, string enginename, float engineversion)
|
||||||
registercommand("chooseteam");
|
registercommand("chooseteam");
|
||||||
registercommand("changeteam");
|
registercommand("changeteam");
|
||||||
Obituary_Init();
|
Obituary_Init();
|
||||||
|
|
||||||
|
pSeatTFC = &g_seats_tfc[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
void VGUI_ChooseTeam(void);
|
void VGUI_ChooseTeam(void);
|
||||||
|
@ -67,4 +69,5 @@ ClientGame_RendererRestart(string rstr)
|
||||||
MUZZLE_SMALL = (int)getmodelindex("sprites/muzzleflash2.spr");
|
MUZZLE_SMALL = (int)getmodelindex("sprites/muzzleflash2.spr");
|
||||||
MUZZLE_WEIRD = (int)getmodelindex("sprites/muzzleflash3.spr");
|
MUZZLE_WEIRD = (int)getmodelindex("sprites/muzzleflash3.spr");
|
||||||
MUZZLE_ROUND = (int)getmodelindex("sprites/muzzleflash.spr");
|
MUZZLE_ROUND = (int)getmodelindex("sprites/muzzleflash.spr");
|
||||||
|
HLSprite_Init();
|
||||||
}
|
}
|
||||||
|
|
|
@ -228,5 +228,5 @@ VGUI_ChooseClass(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
winClassSelection.Show();
|
winClassSelection.Show();
|
||||||
winClassSelection.SetPos((video_res / 2) - (winClassSelection.GetSize() / 2));
|
winClassSelection.SetPos((g_vidsize / 2) - (winClassSelection.GetSize() / 2));
|
||||||
}
|
}
|
|
@ -155,5 +155,5 @@ VGUI_ChooseTeam(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
winChooseTeam.Show();
|
winChooseTeam.Show();
|
||||||
winChooseTeam.SetPos((video_res / 2) - (winChooseTeam.GetSize() / 2));
|
winChooseTeam.SetPos((g_vidsize / 2) - (winChooseTeam.GetSize() / 2));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
CC=fteqcc
|
QCC=fteqcc
|
||||||
|
|
||||||
all:
|
all:
|
||||||
$(CC) progs.src
|
$(QCC) progs.src
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
void
|
void
|
||||||
Game_RunClientCommand(void)
|
Game_RunClientCommand(void)
|
||||||
{
|
{
|
||||||
player pl = (player)self;
|
TFPlayer pl = (TFPlayer)self;
|
||||||
|
|
||||||
/* clear map triggers */
|
/* clear map triggers */
|
||||||
pl.gflags &= ~GF_NOBUILDZONE;
|
pl.gflags &= ~GF_NOBUILDZONE;
|
||||||
|
|
|
@ -28,28 +28,28 @@ TFCDispenser:NSSurfacePropEntity
|
||||||
int m_iRockets;
|
int m_iRockets;
|
||||||
int m_iCells;
|
int m_iCells;
|
||||||
int m_iArmor;
|
int m_iArmor;
|
||||||
|
|
||||||
void(void) TFCDispenser;
|
|
||||||
|
|
||||||
virtual void(player) Place;
|
void TFCDispenser(void);
|
||||||
virtual void(void) FinishPlacing;
|
|
||||||
|
|
||||||
virtual void(entity) Touch;
|
virtual void Place(TFPlayer);
|
||||||
|
virtual void FinishPlacing(void);
|
||||||
|
|
||||||
virtual void(void) Replenish;
|
virtual void Touch(entity);
|
||||||
virtual void(void) ClampValues;
|
|
||||||
|
|
||||||
virtual int(void) GrabShells;
|
virtual void Replenish(void);
|
||||||
virtual int(void) GrabNails;
|
virtual void ClampValues(void);
|
||||||
virtual int(void) GrabRockets;
|
|
||||||
virtual int(void) GrabCells;
|
|
||||||
virtual int(void) GrabArmor;
|
|
||||||
|
|
||||||
virtual void(void) Death;
|
virtual int GrabShells(void);
|
||||||
|
virtual int GrabNails(void);
|
||||||
|
virtual int GrabRockets(void);
|
||||||
|
virtual int GrabCells(void);
|
||||||
|
virtual int GrabArmor(void);
|
||||||
|
|
||||||
|
virtual void Death(entity, entity, int, vector, int);
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
TFCDispenser::Death(void)
|
TFCDispenser::Death(entity inflictor, entity attacker, int damage, vector dir, int location)
|
||||||
{
|
{
|
||||||
env_message_single(real_owner, "#Dispenser_destroyed");
|
env_message_single(real_owner, "#Dispenser_destroyed");
|
||||||
pointparticles(particleeffectnum("fx_explosion.main"), origin, [0,0,0], 1);
|
pointparticles(particleeffectnum("fx_explosion.main"), origin, [0,0,0], 1);
|
||||||
|
@ -171,19 +171,23 @@ TFCDispenser::Touch(entity eToucher)
|
||||||
if (m_flNextDispense > time)
|
if (m_flNextDispense > time)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
player pl = (player)eToucher;
|
TFPlayer pl = (TFPlayer)eToucher;
|
||||||
|
int rocketType = ammoNumForName("ammo_rockets");
|
||||||
|
int nailType = ammoNumForName("ammo_nails");
|
||||||
|
int cellType = ammoNumForName("ammo_cells");
|
||||||
|
int shellType = ammoNumForName("ammo_shells");
|
||||||
|
|
||||||
int r, n, c, s, a, sum;
|
int r, n, c, s, a, sum;
|
||||||
r = n = c = s = a = sum = 0;
|
r = n = c = s = a = sum = 0;
|
||||||
|
|
||||||
/* only subtract what if we need anything */
|
/* only subtract what if we need anything */
|
||||||
if (pl.m_iAmmoRockets < pl.m_iMaxRockets)
|
if (pl.GetReserveAmmo(rocketType) < pl.m_iMaxRockets)
|
||||||
r = GrabRockets();
|
r = GrabRockets();
|
||||||
if (pl.m_iAmmoNails < pl.m_iMaxNails)
|
if (pl.GetReserveAmmo(nailType) < pl.m_iMaxNails)
|
||||||
n = GrabNails();
|
n = GrabNails();
|
||||||
if (pl.m_iAmmoCells < pl.m_iMaxCells)
|
if (pl.GetReserveAmmo(cellType) < pl.m_iMaxCells)
|
||||||
c = GrabCells();
|
c = GrabCells();
|
||||||
if (pl.m_iAmmoShells < pl.m_iMaxShells)
|
if (pl.GetReserveAmmo(shellType) < pl.m_iMaxShells)
|
||||||
s = GrabShells();
|
s = GrabShells();
|
||||||
if (pl.armor < pl.m_iMaxArmor)
|
if (pl.armor < pl.m_iMaxArmor)
|
||||||
a = GrabArmor();
|
a = GrabArmor();
|
||||||
|
@ -198,21 +202,12 @@ TFCDispenser::Touch(entity eToucher)
|
||||||
sound(this, CHAN_ITEM, "weapons/scock1.wav", 1.0, ATTN_NORM);
|
sound(this, CHAN_ITEM, "weapons/scock1.wav", 1.0, ATTN_NORM);
|
||||||
|
|
||||||
/* add whatever it is we can get */
|
/* add whatever it is we can get */
|
||||||
pl.m_iAmmoRockets += r;
|
pl.GiveAmmo(rocketType, r);
|
||||||
pl.m_iAmmoNails += n;
|
pl.GiveAmmo(nailType, n);
|
||||||
pl.m_iAmmoCells += c;
|
pl.GiveAmmo(cellType, c);
|
||||||
pl.m_iAmmoShells += s;
|
pl.GiveAmmo(shellType, s);
|
||||||
pl.armor += a;
|
pl.armor += a;
|
||||||
|
|
||||||
/* clamp player values */
|
|
||||||
if (pl.m_iAmmoRockets > pl.m_iMaxRockets)
|
|
||||||
pl.m_iAmmoRockets = pl.m_iMaxRockets;
|
|
||||||
if (pl.m_iAmmoNails > pl.m_iMaxNails)
|
|
||||||
pl.m_iAmmoNails = pl.m_iMaxNails;
|
|
||||||
if (pl.m_iAmmoCells > pl.m_iMaxCells)
|
|
||||||
pl.m_iAmmoCells = pl.m_iMaxCells;
|
|
||||||
if (pl.m_iAmmoShells > pl.m_iMaxShells)
|
|
||||||
pl.m_iAmmoShells = pl.m_iMaxShells;
|
|
||||||
if (pl.armor > pl.m_iMaxArmor)
|
if (pl.armor > pl.m_iMaxArmor)
|
||||||
pl.armor = pl. m_iMaxArmor;
|
pl.armor = pl. m_iMaxArmor;
|
||||||
|
|
||||||
|
@ -220,7 +215,7 @@ TFCDispenser::Touch(entity eToucher)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TFCDispenser::Place(player pl)
|
TFCDispenser::Place(TFPlayer pl)
|
||||||
{
|
{
|
||||||
vector newAngles = pl.GetAngles();
|
vector newAngles = pl.GetAngles();
|
||||||
newAngles[0] = newAngles[2] = 0;
|
newAngles[0] = newAngles[2] = 0;
|
||||||
|
@ -260,14 +255,15 @@ TFCDispenser::TFCDispenser(void)
|
||||||
void
|
void
|
||||||
TFCDispenser_Build(void)
|
TFCDispenser_Build(void)
|
||||||
{
|
{
|
||||||
player pl = (player)self;
|
TFPlayer pl = (TFPlayer)self;
|
||||||
|
int cellType = ammoNumForName("ammo_cells");
|
||||||
|
|
||||||
/* only engineers can do this */
|
/* only engineers can do this */
|
||||||
if (pl.classtype != CLASS_ENGINEER)
|
if (pl.classtype != CLASS_ENGINEER)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* it costs */
|
/* it costs cells to build these things */
|
||||||
if (pl.m_iAmmoCells < TFC_DISPENSER_COST) {
|
if (pl.UseAmmo(cellType, TFC_DISPENSER_COST) == false) {
|
||||||
env_message_single(pl, "#Build_nometal");
|
env_message_single(pl, "#Build_nometal");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -283,8 +279,6 @@ TFCDispenser_Build(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pl.m_iAmmoCells -= TFC_DISPENSER_COST;
|
|
||||||
|
|
||||||
/* deploy */
|
/* deploy */
|
||||||
TFCDispenser dispenser = spawn(TFCDispenser);
|
TFCDispenser dispenser = spawn(TFCDispenser);
|
||||||
dispenser.Place(pl);
|
dispenser.Place(pl);
|
||||||
|
@ -293,5 +287,5 @@ TFCDispenser_Build(void)
|
||||||
void
|
void
|
||||||
TFCDispenser_Dismantle(void)
|
TFCDispenser_Dismantle(void)
|
||||||
{
|
{
|
||||||
TFC_DetonateTypeForPlayer((player)self, "TFCDispenser");
|
TFC_DetonateTypeForPlayer((TFPlayer)self, "TFCDispenser");
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ func_nobuild:NSBrushTrigger
|
||||||
void
|
void
|
||||||
func_nobuild::Touch(entity eToucher)
|
func_nobuild::Touch(entity eToucher)
|
||||||
{
|
{
|
||||||
player pl = (player)eToucher;
|
TFPlayer pl = (TFPlayer)eToucher;
|
||||||
if (!(eToucher.flags & FL_CLIENT))
|
if (!(eToucher.flags & FL_CLIENT))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ func_nogrenades:NSBrushTrigger
|
||||||
void
|
void
|
||||||
func_nogrenades::Touch(entity eToucher)
|
func_nogrenades::Touch(entity eToucher)
|
||||||
{
|
{
|
||||||
player pl = (player)eToucher;
|
TFPlayer pl = (TFPlayer)eToucher;
|
||||||
if (!(eToucher.flags & FL_CLIENT))
|
if (!(eToucher.flags & FL_CLIENT))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,7 @@ TFCGameRules_PlayerRespawn(void)
|
||||||
void
|
void
|
||||||
TFCGameRules::PlayerDeath(NSClientPlayer pp)
|
TFCGameRules::PlayerDeath(NSClientPlayer pp)
|
||||||
{
|
{
|
||||||
player pl = (player)pp;
|
TFPlayer pl = (TFPlayer)pp;
|
||||||
|
|
||||||
DropGoalItem(pp);
|
DropGoalItem(pp);
|
||||||
pl.SetSolid(SOLID_NOT);
|
pl.SetSolid(SOLID_NOT);
|
||||||
|
@ -140,14 +140,12 @@ TFCGameRules::PlayerDeath(NSClientPlayer pp)
|
||||||
void
|
void
|
||||||
TFCGameRules::PlayerKill(NSClientPlayer pp)
|
TFCGameRules::PlayerKill(NSClientPlayer pp)
|
||||||
{
|
{
|
||||||
player pl = (player)pp;
|
|
||||||
Damage_Apply(pl, pl, pl.health, WEAPON_NONE, DMG_SKIP_ARMOR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TFCGameRules::PlayerRespawn(NSClientPlayer pp)
|
TFCGameRules::PlayerRespawn(NSClientPlayer pp)
|
||||||
{
|
{
|
||||||
player pl = (player)pp;
|
TFPlayer pl = (TFPlayer)pp;
|
||||||
pl.MakeClass(pl.classtype);
|
pl.MakeClass(pl.classtype);
|
||||||
pl.SpawnIntoGame();
|
pl.SpawnIntoGame();
|
||||||
}
|
}
|
||||||
|
@ -155,7 +153,7 @@ TFCGameRules::PlayerRespawn(NSClientPlayer pp)
|
||||||
void
|
void
|
||||||
TFCGameRules::PlayerSpawn(NSClientPlayer pp)
|
TFCGameRules::PlayerSpawn(NSClientPlayer pp)
|
||||||
{
|
{
|
||||||
player pl = (player)pp;
|
TFPlayer pl = (TFPlayer)pp;
|
||||||
pl.MakeTempSpectator(); /* replace this with a non-spectator ghost */
|
pl.MakeTempSpectator(); /* replace this with a non-spectator ghost */
|
||||||
Spawn_ObserverCam(pl);
|
Spawn_ObserverCam(pl);
|
||||||
}
|
}
|
||||||
|
@ -164,31 +162,6 @@ bool
|
||||||
TFCGameRules::ImpulseCommand(NSClient bp, float num)
|
TFCGameRules::ImpulseCommand(NSClient bp, float num)
|
||||||
{
|
{
|
||||||
switch (num) {
|
switch (num) {
|
||||||
case 101:
|
|
||||||
player pl = (player)bp;
|
|
||||||
if (cvar("sv_cheats") > 0) {
|
|
||||||
Weapons_AddItem(pl, WEAPON_CROWBAR, -1);
|
|
||||||
Weapons_AddItem(pl, WEAPON_MEDKIT, -1);
|
|
||||||
Weapons_AddItem(pl, WEAPON_KNIFE, -1);
|
|
||||||
Weapons_AddItem(pl, WEAPON_WRENCH, -1);
|
|
||||||
Weapons_AddItem(pl, WEAPON_UMBRELLA, -1);
|
|
||||||
Weapons_AddItem(pl, WEAPON_SBS, -1);
|
|
||||||
Weapons_AddItem(pl, WEAPON_SNIPER, -1);
|
|
||||||
Weapons_AddItem(pl, WEAPON_TRANQUIL, -1);
|
|
||||||
Weapons_AddItem(pl, WEAPON_RAILGUN, -1);
|
|
||||||
Weapons_AddItem(pl, WEAPON_AUTORIFLE, -1);
|
|
||||||
Weapons_AddItem(pl, WEAPON_DBS, -1);
|
|
||||||
Weapons_AddItem(pl, WEAPON_NAILGUN, -1);
|
|
||||||
Weapons_AddItem(pl, WEAPON_GLAUNCHER, -1);
|
|
||||||
Weapons_AddItem(pl, WEAPON_SUPERNAIL, -1);
|
|
||||||
Weapons_AddItem(pl, WEAPON_FLAMER, -1);
|
|
||||||
Weapons_AddItem(pl, WEAPON_RPG, -1);
|
|
||||||
Weapons_AddItem(pl, WEAPON_PIPEBOMB, -1);
|
|
||||||
Weapons_AddItem(pl, WEAPON_ASSCAN, -1);
|
|
||||||
Weapons_AddItem(pl, WEAPON_INCENDIARY, -1);
|
|
||||||
Weapons_AddItem(pl, WEAPON_GRAPPLE, -1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
return super::ImpulseCommand(bp, num);
|
return super::ImpulseCommand(bp, num);
|
||||||
}
|
}
|
||||||
|
@ -201,6 +174,25 @@ TFCGameRules::InitPostEnts(void)
|
||||||
{
|
{
|
||||||
super::InitPostEnts();
|
super::InitPostEnts();
|
||||||
|
|
||||||
|
EntityDef_Precache("tf_weapon_ac");
|
||||||
|
EntityDef_Precache("tf_weapon_autorifle");
|
||||||
|
EntityDef_Precache("tf_weapon_axe");
|
||||||
|
EntityDef_Precache("tf_weapon_flamethrower");
|
||||||
|
EntityDef_Precache("tf_weapon_gl");
|
||||||
|
EntityDef_Precache("tf_weapon_ic");
|
||||||
|
EntityDef_Precache("tf_weapon_knife");
|
||||||
|
EntityDef_Precache("tf_weapon_medikit");
|
||||||
|
EntityDef_Precache("tf_weapon_ng");
|
||||||
|
EntityDef_Precache("tf_weapon_pl");
|
||||||
|
EntityDef_Precache("tf_weapon_railgun");
|
||||||
|
EntityDef_Precache("tf_weapon_rpg");
|
||||||
|
EntityDef_Precache("tf_weapon_shotgun");
|
||||||
|
EntityDef_Precache("tf_weapon_sniperrifle");
|
||||||
|
EntityDef_Precache("tf_weapon_spanner");
|
||||||
|
EntityDef_Precache("tf_weapon_superng");
|
||||||
|
EntityDef_Precache("tf_weapon_supershotgun");
|
||||||
|
EntityDef_Precache("tf_weapon_tranq");
|
||||||
|
|
||||||
/* rename the team spawns. */
|
/* rename the team spawns. */
|
||||||
info_player_teamspawn::RenameTeamSpawns();
|
info_player_teamspawn::RenameTeamSpawns();
|
||||||
info_tfdetect::Setup();
|
info_tfdetect::Setup();
|
||||||
|
|
|
@ -75,10 +75,10 @@ info_areadef::SpawnKey(string strKey, string strValue)
|
||||||
void
|
void
|
||||||
info_areadef::Respawn(void)
|
info_areadef::Respawn(void)
|
||||||
{
|
{
|
||||||
|
super::Respawn();
|
||||||
|
|
||||||
/* set up our volume */
|
/* set up our volume */
|
||||||
SetSolid(SOLID_TRIGGER);
|
SetSolid(SOLID_TRIGGER);
|
||||||
SetMovetype(MOVETYPE_NONE);
|
|
||||||
SetOrigin(GetSpawnOrigin());
|
|
||||||
SetSize(m_vecMins, m_vecMaxs);
|
SetSize(m_vecMins, m_vecMaxs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ class info_tfgoal:NSRenderableEntity
|
||||||
tfgoal_activation m_tfgActivation;
|
tfgoal_activation m_tfgActivation;
|
||||||
tfgoal_effects m_tfgEffects;
|
tfgoal_effects m_tfgEffects;
|
||||||
tfgoal_result m_tfgResult;
|
tfgoal_result m_tfgResult;
|
||||||
player m_Activator;
|
TFPlayer m_Activator;
|
||||||
|
|
||||||
float m_dMustCarry; /* player must carry item of this ID */
|
float m_dMustCarry; /* player must carry item of this ID */
|
||||||
float m_dRespawn; /* respawn after num seconds on TFRESULT_REMOVE */
|
float m_dRespawn; /* respawn after num seconds on TFRESULT_REMOVE */
|
||||||
|
@ -130,11 +130,17 @@ void
|
||||||
info_tfgoal::Touch(entity eToucher)
|
info_tfgoal::Touch(entity eToucher)
|
||||||
{
|
{
|
||||||
item_tfgoal findme = __NULL__;
|
item_tfgoal findme = __NULL__;
|
||||||
|
int rocketType = ammoNumForName("ammo_rockets");
|
||||||
|
int nailType = ammoNumForName("ammo_nails");
|
||||||
|
int cellType = ammoNumForName("ammo_cells");
|
||||||
|
int shellType = ammoNumForName("ammo_shells");
|
||||||
|
int medikitType = ammoNumForName("ammo_medkit");
|
||||||
|
int detpackType = ammoNumForName("ammo_detpack");
|
||||||
|
|
||||||
if (eToucher.classname != "player") {
|
if (eToucher.classname != "player") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
player pl = (player)eToucher;
|
TFPlayer pl = (TFPlayer)eToucher;
|
||||||
|
|
||||||
/* check for state */
|
/* check for state */
|
||||||
if (m_tfgState != TFGOAL_INACTIVE) {
|
if (m_tfgState != TFGOAL_INACTIVE) {
|
||||||
|
@ -179,7 +185,7 @@ info_tfgoal::Touch(entity eToucher)
|
||||||
|
|
||||||
/* mark as removed on the player end, too. */
|
/* mark as removed on the player end, too. */
|
||||||
pl.g_items &= ~ITEM_GOALITEM;
|
pl.g_items &= ~ITEM_GOALITEM;
|
||||||
pl.flags &= ~FL_GOALITEM;
|
pl.RemoveVFlags(VFL_GOALITEM);
|
||||||
forceinfokey(pl, "*goalitem_t", "");
|
forceinfokey(pl, "*goalitem_t", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,20 +195,16 @@ info_tfgoal::Touch(entity eToucher)
|
||||||
/* here we increase/decrease funstuff */
|
/* here we increase/decrease funstuff */
|
||||||
pl.health += m_iHealth;
|
pl.health += m_iHealth;
|
||||||
pl.armor += m_iArmor;
|
pl.armor += m_iArmor;
|
||||||
pl.m_iAmmoShells += m_iShells;
|
pl.GiveAmmo(rocketType, m_iRockets);
|
||||||
pl.m_iAmmoNails += m_iNails;
|
pl.GiveAmmo(nailType, m_iNails);
|
||||||
pl.m_iAmmoCells += m_iCells;
|
pl.GiveAmmo(cellType, m_iCells);
|
||||||
pl.m_iAmmoRockets += m_iRockets;
|
pl.GiveAmmo(shellType, m_iShells);
|
||||||
pl.m_iAmmoMedikit += m_iMedikit;
|
pl.GiveAmmo(medikitType, m_iMedikit);
|
||||||
pl.m_iAmmoDetpack += m_iDetpack;
|
pl.GiveAmmo(detpackType, m_iDetpack);
|
||||||
|
|
||||||
/* clamp */
|
/* clamp */
|
||||||
pl.health = bound(0, pl.health, pl.m_iMaxHealth);
|
pl.health = bound(0, pl.health, pl.m_iMaxHealth);
|
||||||
pl.armor = bound(0, pl.armor, pl.m_iMaxArmor);
|
pl.armor = bound(0, pl.armor, pl.m_iMaxArmor);
|
||||||
pl.m_iAmmoShells = bound(0, pl.m_iAmmoShells, pl.m_iMaxShells);
|
|
||||||
pl.m_iAmmoNails = bound(0, pl.m_iAmmoNails, pl.m_iMaxNails);
|
|
||||||
pl.m_iAmmoCells = bound(0, pl.m_iAmmoCells, pl.m_iMaxCells);
|
|
||||||
pl.m_iAmmoRockets = bound(0, pl.m_iAmmoRockets, pl.m_iMaxRockets);
|
|
||||||
|
|
||||||
pl.frags += frags;
|
pl.frags += frags;
|
||||||
|
|
||||||
|
@ -284,9 +286,9 @@ info_tfgoal::Respawn(void)
|
||||||
{
|
{
|
||||||
SetSolid(SOLID_TRIGGER);
|
SetSolid(SOLID_TRIGGER);
|
||||||
SetMovetype(MOVETYPE_NONE);
|
SetMovetype(MOVETYPE_NONE);
|
||||||
SetModel(GetSpawnModel());
|
SetModel(GetSpawnString("model"));
|
||||||
SetSize(VEC_HULL_MIN, VEC_HULL_MAX);
|
SetSize(VEC_HULL_MIN, VEC_HULL_MAX);
|
||||||
SetOrigin(GetSpawnOrigin());
|
SetOrigin(GetSpawnVector("origin"));
|
||||||
team = m_iTeamUses;
|
team = m_iTeamUses;
|
||||||
|
|
||||||
if (frags > 0)
|
if (frags > 0)
|
||||||
|
@ -448,8 +450,8 @@ i_t_g::Respawn(void)
|
||||||
{
|
{
|
||||||
SetSolid(SOLID_BSPTRIGGER);
|
SetSolid(SOLID_BSPTRIGGER);
|
||||||
SetMovetype(MOVETYPE_NONE);
|
SetMovetype(MOVETYPE_NONE);
|
||||||
SetModel(GetSpawnModel());
|
SetModel(GetSpawnString("model"));
|
||||||
SetOrigin(GetSpawnOrigin());
|
SetOrigin(GetSpawnVector("origin"));
|
||||||
Hide();
|
Hide();
|
||||||
team = m_iTeamUses;
|
team = m_iTeamUses;
|
||||||
|
|
||||||
|
|
|
@ -65,10 +65,10 @@ TFCArmor::Spawned(void)
|
||||||
void
|
void
|
||||||
TFCArmor::Respawn(void)
|
TFCArmor::Respawn(void)
|
||||||
{
|
{
|
||||||
SetModel(GetSpawnModel());
|
SetModel(GetSpawnString("model"));
|
||||||
SetSize([-16,-16,0], [16,16,56]);
|
SetSize([-16,-16,0], [16,16,56]);
|
||||||
SetSolid(SOLID_TRIGGER);
|
SetSolid(SOLID_TRIGGER);
|
||||||
SetOrigin(GetSpawnOrigin());
|
SetOrigin(GetSpawnVector("origin"));
|
||||||
DropToFloor();
|
DropToFloor();
|
||||||
botinfo = BOTINFO_ARMOR;
|
botinfo = BOTINFO_ARMOR;
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,9 @@ TFCArmor::Touch(entity eToucher)
|
||||||
if (eToucher.classname != "player") {
|
if (eToucher.classname != "player") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
player pl = (player)eToucher;
|
|
||||||
|
TFPlayer pl = (TFPlayer)eToucher;
|
||||||
|
int cellType = ammoNumForName("ammo_cells");
|
||||||
|
|
||||||
/* check for team eligibility */
|
/* check for team eligibility */
|
||||||
if (m_iTeamUses)
|
if (m_iTeamUses)
|
||||||
|
@ -87,7 +89,7 @@ TFCArmor::Touch(entity eToucher)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* if we can't add anything, don't bother */
|
/* if we can't add anything, don't bother */
|
||||||
if (pl.armor >= pl.m_iMaxArmor && pl.m_iAmmoCells >= pl.m_iMaxCells)
|
if (pl.armor >= pl.m_iMaxArmor && pl.GetReserveAmmo(cellType) >= pl.m_iMaxCells)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int ap;
|
int ap;
|
||||||
|
@ -106,7 +108,7 @@ TFCArmor::Touch(entity eToucher)
|
||||||
|
|
||||||
/* give the remaining as metal... engineers only!*/
|
/* give the remaining as metal... engineers only!*/
|
||||||
if (pl.classtype == CLASS_ENGINEER) {
|
if (pl.classtype == CLASS_ENGINEER) {
|
||||||
pl. m_iAmmoCells = bound(0, pl.m_iAmmoCells + (tp - ap), pl.m_iMaxCells);
|
pl.GiveAmmo(cellType, (tp - ap));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ item_healthkit::Touch(entity eToucher)
|
||||||
if (eToucher.classname != "player") {
|
if (eToucher.classname != "player") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
player pl = (player)eToucher;
|
TFPlayer pl = (TFPlayer)eToucher;
|
||||||
|
|
||||||
/* check for team eligibility */
|
/* check for team eligibility */
|
||||||
if (m_iTeamUses)
|
if (m_iTeamUses)
|
||||||
|
@ -88,7 +88,7 @@ item_healthkit::Respawn(void)
|
||||||
SetModel("models/w_medkit.mdl");
|
SetModel("models/w_medkit.mdl");
|
||||||
SetSize([-16,-16,0], [16,16,56]);
|
SetSize([-16,-16,0], [16,16,56]);
|
||||||
SetSolid(SOLID_TRIGGER);
|
SetSolid(SOLID_TRIGGER);
|
||||||
SetOrigin(GetSpawnOrigin());
|
SetOrigin(GetSpawnVector("origin"));
|
||||||
DropToFloor();
|
DropToFloor();
|
||||||
botinfo = BOTINFO_HEALTH;
|
botinfo = BOTINFO_HEALTH;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,8 +54,8 @@ Duplicate keys:
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GISTATUS_HOME,
|
GISTATUS_HOME, /*<< The item is at its home base. */
|
||||||
GISTATUS_DROPPED
|
GISTATUS_DROPPED /*<< The item is at neither on a player, nor at its base. */
|
||||||
} goalitem_status_e;
|
} goalitem_status_e;
|
||||||
|
|
||||||
class item_tfgoal:NSRenderableEntity
|
class item_tfgoal:NSRenderableEntity
|
||||||
|
@ -66,7 +66,7 @@ class item_tfgoal:NSRenderableEntity
|
||||||
int m_iTeamOwner;
|
int m_iTeamOwner;
|
||||||
|
|
||||||
string m_strSound;
|
string m_strSound;
|
||||||
player m_eActivator;
|
TFPlayer m_eActivator;
|
||||||
|
|
||||||
goalitem_status_e m_status;
|
goalitem_status_e m_status;
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ class item_tfgoal:NSRenderableEntity
|
||||||
void
|
void
|
||||||
item_tfgoal::DropReturnable(NSClientPlayer pp)
|
item_tfgoal::DropReturnable(NSClientPlayer pp)
|
||||||
{
|
{
|
||||||
player pl = (player)pp;
|
TFPlayer pl = (TFPlayer)pp;
|
||||||
|
|
||||||
/* make it available again, put it exactly where we died */
|
/* make it available again, put it exactly where we died */
|
||||||
Respawn();
|
Respawn();
|
||||||
|
@ -137,7 +137,7 @@ item_tfgoal::Touch(entity eToucher)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
player pl = (player)eToucher;
|
TFPlayer pl = (TFPlayer)eToucher;
|
||||||
|
|
||||||
/* not in standard TFC, make cvar? */
|
/* not in standard TFC, make cvar? */
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -158,7 +158,7 @@ item_tfgoal::Touch(entity eToucher)
|
||||||
|
|
||||||
Disappear();
|
Disappear();
|
||||||
pl.g_items |= ITEM_GOALITEM;
|
pl.g_items |= ITEM_GOALITEM;
|
||||||
pl.flags |= FL_GOALITEM;
|
pl.AddVFlags(VFL_GOALITEM);
|
||||||
forceinfokey(pl, "*goalitem_t", itos(m_iTeamOwner));
|
forceinfokey(pl, "*goalitem_t", itos(m_iTeamOwner));
|
||||||
|
|
||||||
m_eActivator = pl;
|
m_eActivator = pl;
|
||||||
|
@ -214,10 +214,10 @@ item_tfgoal::Touch(entity eToucher)
|
||||||
void
|
void
|
||||||
item_tfgoal::Respawn(void)
|
item_tfgoal::Respawn(void)
|
||||||
{
|
{
|
||||||
SetModel(GetSpawnModel());
|
SetModel(GetSpawnString("model"));
|
||||||
SetSize(VEC_HULL_MIN, VEC_HULL_MAX);
|
SetSize(VEC_HULL_MIN, VEC_HULL_MAX);
|
||||||
SetSolid(SOLID_TRIGGER);
|
SetSolid(SOLID_TRIGGER);
|
||||||
SetOrigin(GetSpawnOrigin());
|
SetOrigin(GetSpawnVector("origin"));
|
||||||
m_eActivator = __NULL__;
|
m_eActivator = __NULL__;
|
||||||
ReleaseThink();
|
ReleaseThink();
|
||||||
m_status = GISTATUS_HOME;
|
m_status = GISTATUS_HOME;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
void
|
void
|
||||||
TFCNade_ThrowCaltrop(player pl)
|
TFCNade_ThrowCaltrop(TFPlayer pl)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
vector vecNadeVelocity;
|
vector vecNadeVelocity;
|
||||||
|
|
||||||
static void TFCNade_ThrowHandGrenade_Touch(void) {
|
static void TFCNade_ThrowHandGrenade_Touch(void) {
|
||||||
|
@ -34,11 +35,13 @@ TFCNade_ThrowCaltrop(player pl)
|
||||||
|
|
||||||
eNade.touch = TFCNade_ThrowHandGrenade_Touch;
|
eNade.touch = TFCNade_ThrowHandGrenade_Touch;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TFCNade_ThrowHandGrenade(player pl)
|
TFCNade_ThrowHandGrenade(TFPlayer pl)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
vector vecNadeVelocity;
|
vector vecNadeVelocity;
|
||||||
float flTimer;
|
float flTimer;
|
||||||
|
|
||||||
|
@ -74,11 +77,13 @@ TFCNade_ThrowHandGrenade(player pl)
|
||||||
|
|
||||||
eNade.touch = TFCNade_ThrowHandGrenade_Touch;
|
eNade.touch = TFCNade_ThrowHandGrenade_Touch;
|
||||||
eNade.ScheduleThink(TFCNade_ThrowHandGrenade_Explode, flTimer);
|
eNade.ScheduleThink(TFCNade_ThrowHandGrenade_Explode, flTimer);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TFCNade_ThrowConcussion(player pl)
|
TFCNade_ThrowConcussion(TFPlayer pl)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
vector vecNadeVelocity;
|
vector vecNadeVelocity;
|
||||||
float flTimer;
|
float flTimer;
|
||||||
|
|
||||||
|
@ -90,7 +95,7 @@ TFCNade_ThrowConcussion(player pl)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TFCNade_ThrowConcussion_Explode(void) {
|
static void TFCNade_ThrowConcussion_Explode(void) {
|
||||||
for (player f = world; (f = (player)find(f, ::classname, "player"));) {
|
for (TFPlayer f = world; (f = (TFPlayer)find(f, ::classname, "player"));) {
|
||||||
float dist = vlen(f.origin - self.origin);
|
float dist = vlen(f.origin - self.origin);
|
||||||
|
|
||||||
if (dist < 256) {
|
if (dist < 256) {
|
||||||
|
@ -144,11 +149,13 @@ TFCNade_ThrowConcussion(player pl)
|
||||||
|
|
||||||
eNade.touch = TFCNade_ThrowConcussion_Touch;
|
eNade.touch = TFCNade_ThrowConcussion_Touch;
|
||||||
eNade.ScheduleThink(TFCNade_ThrowConcussion_Explode, flTimer);
|
eNade.ScheduleThink(TFCNade_ThrowConcussion_Explode, flTimer);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TFCNade_ThrowNail(player pl)
|
TFCNade_ThrowNail(TFPlayer pl)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
vector vecNadeVelocity;
|
vector vecNadeVelocity;
|
||||||
float flTimer;
|
float flTimer;
|
||||||
|
|
||||||
|
@ -235,11 +242,13 @@ TFCNade_ThrowNail(player pl)
|
||||||
|
|
||||||
eNade.touch = TFCNade_ThrowNail_Touch;
|
eNade.touch = TFCNade_ThrowNail_Touch;
|
||||||
eNade.ScheduleThink(TFCNade_ThrowNail_Deploy, flTimer);
|
eNade.ScheduleThink(TFCNade_ThrowNail_Deploy, flTimer);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TFCNade_ThrowMIRVBomblet(NSEntity bomb)
|
TFCNade_ThrowMIRVBomblet(NSEntity bomb)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
vector vecNadeVelocity;
|
vector vecNadeVelocity;
|
||||||
|
|
||||||
static void TFCNade_ThrowMIRVBomblet_Touch(void) {
|
static void TFCNade_ThrowMIRVBomblet_Touch(void) {
|
||||||
|
@ -256,7 +265,7 @@ TFCNade_ThrowMIRVBomblet(NSEntity bomb)
|
||||||
NSEntity::Destroy();
|
NSEntity::Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
player pl = (player)bomb.owner;
|
TFPlayer pl = (TFPlayer)bomb.owner;
|
||||||
|
|
||||||
makevectors([0, random() * 360, 0]);
|
makevectors([0, random() * 360, 0]);
|
||||||
vecNadeVelocity = v_forward * 100 + v_up * 350 + crandom() * v_right * 10 + crandom() * v_up * 10;
|
vecNadeVelocity = v_forward * 100 + v_up * 350 + crandom() * v_right * 10 + crandom() * v_up * 10;
|
||||||
|
@ -275,11 +284,13 @@ TFCNade_ThrowMIRVBomblet(NSEntity bomb)
|
||||||
|
|
||||||
eNade.touch = TFCNade_ThrowMIRVBomblet_Touch;
|
eNade.touch = TFCNade_ThrowMIRVBomblet_Touch;
|
||||||
eNade.ScheduleThink(TFCNade_ThrowMIRVBomblet_Explode, 1.5f + random());
|
eNade.ScheduleThink(TFCNade_ThrowMIRVBomblet_Explode, 1.5f + random());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TFCNade_ThrowMIRV(player pl)
|
TFCNade_ThrowMIRV(TFPlayer pl)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
vector vecNadeVelocity;
|
vector vecNadeVelocity;
|
||||||
float flTimer;
|
float flTimer;
|
||||||
|
|
||||||
|
@ -319,11 +330,13 @@ TFCNade_ThrowMIRV(player pl)
|
||||||
eNade.SetSkin(1);
|
eNade.SetSkin(1);
|
||||||
eNade.ScheduleThink(TFCNade_ThrowMIRV_Explode, flTimer);
|
eNade.ScheduleThink(TFCNade_ThrowMIRV_Explode, flTimer);
|
||||||
eNade.touch = TFCNade_ThrowMIRV_Touch;
|
eNade.touch = TFCNade_ThrowMIRV_Touch;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TFCNade_ThrowNapalm(player pl)
|
TFCNade_ThrowNapalm(TFPlayer pl)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
vector vecNadeVelocity;
|
vector vecNadeVelocity;
|
||||||
float flTimer;
|
float flTimer;
|
||||||
|
|
||||||
|
@ -354,11 +367,13 @@ TFCNade_ThrowNapalm(player pl)
|
||||||
|
|
||||||
eNade.touch = TFCNade_ThrowConcussion_Touch;
|
eNade.touch = TFCNade_ThrowConcussion_Touch;
|
||||||
eNade.ScheduleThink(TFCNade_ThrowConcussion_Explode, flTimer);
|
eNade.ScheduleThink(TFCNade_ThrowConcussion_Explode, flTimer);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TFCNade_ThrowHallucination(player pl)
|
TFCNade_ThrowHallucination(TFPlayer pl)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
vector vecNadeVelocity;
|
vector vecNadeVelocity;
|
||||||
float flTimer;
|
float flTimer;
|
||||||
|
|
||||||
|
@ -370,7 +385,7 @@ TFCNade_ThrowHallucination(player pl)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TFCNade_ThrowConcussion_Explode(void) {
|
static void TFCNade_ThrowConcussion_Explode(void) {
|
||||||
for (player f = world; (f = (player)find(f, ::classname, "player"));) {
|
for (TFPlayer f = world; (f = (TFPlayer)find(f, ::classname, "player"));) {
|
||||||
float dist = vlen(f.origin - self.origin);
|
float dist = vlen(f.origin - self.origin);
|
||||||
|
|
||||||
if (dist < 192) {
|
if (dist < 192) {
|
||||||
|
@ -396,11 +411,13 @@ TFCNade_ThrowHallucination(player pl)
|
||||||
|
|
||||||
eNade.touch = TFCNade_ThrowConcussion_Touch;
|
eNade.touch = TFCNade_ThrowConcussion_Touch;
|
||||||
eNade.ScheduleThink(TFCNade_ThrowConcussion_Explode, flTimer);
|
eNade.ScheduleThink(TFCNade_ThrowConcussion_Explode, flTimer);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TFCNade_ThrowEMP(player pl)
|
TFCNade_ThrowEMP(TFPlayer pl)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
vector vecNadeVelocity;
|
vector vecNadeVelocity;
|
||||||
float flTimer;
|
float flTimer;
|
||||||
|
|
||||||
|
@ -431,10 +448,11 @@ TFCNade_ThrowEMP(player pl)
|
||||||
|
|
||||||
eNade.touch = TFCNade_ThrowEMP_Touch;
|
eNade.touch = TFCNade_ThrowEMP_Touch;
|
||||||
eNade.ScheduleThink(TFCNade_ThrowEMP_Explode, flTimer);
|
eNade.ScheduleThink(TFCNade_ThrowEMP_Explode, flTimer);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TFCNade_ThrowSecondary(player pl)
|
TFCNade_ThrowSecondary(TFPlayer pl)
|
||||||
{
|
{
|
||||||
switch (pl.classtype) {
|
switch (pl.classtype) {
|
||||||
case CLASS_SCOUT:
|
case CLASS_SCOUT:
|
||||||
|
@ -464,10 +482,10 @@ TFCNade_ThrowSecondary(player pl)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TFCNade_SelfExplode(player pl)
|
TFCNade_SelfExplode(TFPlayer pl)
|
||||||
{
|
{
|
||||||
float dmg = 100;
|
float dmg = 100;
|
||||||
pointparticles(particleeffectnum("fx_explosion.main"), pl.origin, [0,0,0], 1);
|
pointparticles(particleeffectnum("fx_explosion.main"), pl.origin, [0,0,0], 1);
|
||||||
Damage_Radius(pl.origin, pl, dmg, dmg * 2.5f, TRUE, WEAPON_GLAUNCHER);
|
//Damage_Radius(pl.origin, pl, dmg, dmg * 2.5f, TRUE, WEAPON_GLAUNCHER);
|
||||||
sound(pl, CHAN_WEAPON, sprintf("weapons/explode%d.wav", floor(random() * 2) + 3), 1, ATTN_NORM);
|
sound(pl, CHAN_WEAPON, sprintf("weapons/explode%d.wav", floor(random() * 2) + 3), 1, ATTN_NORM);
|
||||||
}
|
}
|
|
@ -12,28 +12,19 @@
|
||||||
../../../src/shared/defs.h
|
../../../src/shared/defs.h
|
||||||
../../../src/server/defs.h
|
../../../src/server/defs.h
|
||||||
../../../src/botlib/botinfo.h
|
../../../src/botlib/botinfo.h
|
||||||
|
|
||||||
../../../src/gs-entbase/server.src
|
../../../src/gs-entbase/server.src
|
||||||
../../../src/gs-entbase/shared.src
|
../../../src/gs-entbase/shared.src
|
||||||
|
|
||||||
defs.h
|
defs.h
|
||||||
|
|
||||||
../shared/include.src
|
../shared/include.src
|
||||||
|
|
||||||
../../../valve/src/server/player.qc
|
../../../valve/src/server/player.qc
|
||||||
|
|
||||||
dispenser.qc
|
dispenser.qc
|
||||||
sentry.qc
|
sentry.qc
|
||||||
teleporter.qc
|
teleporter.qc
|
||||||
|
|
||||||
func_nobuild.qc
|
func_nobuild.qc
|
||||||
func_nogrenades.qc
|
func_nogrenades.qc
|
||||||
|
|
||||||
vox.qc
|
vox.qc
|
||||||
../../../valve/src/server/items.qc
|
|
||||||
../../../src/botlib/include.src
|
../../../src/botlib/include.src
|
||||||
bot.qc
|
bot.qc
|
||||||
|
|
||||||
info_player_teamspawn.qc
|
info_player_teamspawn.qc
|
||||||
item_tfgoal.qc
|
item_tfgoal.qc
|
||||||
info_tfgoal.qc
|
info_tfgoal.qc
|
||||||
|
@ -42,16 +33,11 @@ info_tfdetect.qc
|
||||||
item_armor.qc
|
item_armor.qc
|
||||||
item_healthkit.qc
|
item_healthkit.qc
|
||||||
nades.qc
|
nades.qc
|
||||||
|
|
||||||
gamerules.qc
|
gamerules.qc
|
||||||
client.qc
|
client.qc
|
||||||
server.qc
|
server.qc
|
||||||
../../../valve/src/server/damage.qc
|
|
||||||
../../../valve/src/server/flashlight.qc
|
../../../valve/src/server/flashlight.qc
|
||||||
../../../valve/src/server/modelevent.qc
|
|
||||||
|
|
||||||
spawn.qc
|
spawn.qc
|
||||||
|
|
||||||
../../../src/server/include.src
|
../../../src/server/include.src
|
||||||
../../../src/shared/include.src
|
../../../src/shared/include.src
|
||||||
#endlist
|
#endlist
|
||||||
|
|
|
@ -64,13 +64,13 @@ TFCSentry::Think(void)
|
||||||
else {
|
else {
|
||||||
makevectors([0, angles[1], 0]);
|
makevectors([0, angles[1], 0]);
|
||||||
m_flWantAngle = dotproduct((origin - t.origin), v_right);
|
m_flWantAngle = dotproduct((origin - t.origin), v_right);
|
||||||
m_flCurrAngle = Math_Lerp(m_flCurrAngle, m_flWantAngle, 0.25f);
|
m_flCurrAngle = lerpAngle(m_flCurrAngle, m_flWantAngle, 0.25f);
|
||||||
m_eHead.SetBoneControl1(m_flCurrAngle);
|
m_eHead.SetBoneControl1(m_flCurrAngle);
|
||||||
print(sprintf("head: %f; want: %f\n", m_flCurrAngle, m_flWantAngle));
|
print(sprintf("head: %f; want: %f\n", m_flCurrAngle, m_flWantAngle));
|
||||||
|
|
||||||
/* fire bullets */
|
/* fire bullets */
|
||||||
input_angles = v_angle = vectoangles(origin - t.origin);
|
input_angles = v_angle = vectoangles(origin - t.origin);
|
||||||
TraceAttack_FireBullets(1, origin, 5, [0.025,0.025], WEAPON_NONE);
|
//TraceAttack_FireBullets(1, origin, 5, [0.025,0.025], WEAPON_NONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,14 +134,15 @@ TFCSentry::TFCSentry(void)
|
||||||
void
|
void
|
||||||
TFCSentry_Build(void)
|
TFCSentry_Build(void)
|
||||||
{
|
{
|
||||||
player pl = (player)self;
|
TFPlayer pl = (TFPlayer)self;
|
||||||
|
int cellType = ammoNumForName("ammo_cells");
|
||||||
|
|
||||||
/* only engineers can do this */
|
/* only engineers can do this */
|
||||||
if (pl.classtype != CLASS_ENGINEER)
|
if (pl.classtype != CLASS_ENGINEER)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* it costs */
|
/* it costs cells to build these things */
|
||||||
if (pl.m_iAmmoCells < TFC_SENTRY_COST) {
|
if (pl.UseAmmo(cellType, TFC_SENTRY_COST) == false) {
|
||||||
env_message_single(pl, "#Build_nometal");
|
env_message_single(pl, "#Build_nometal");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -157,8 +158,6 @@ TFCSentry_Build(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pl.m_iAmmoCells -= TFC_SENTRY_COST;
|
|
||||||
|
|
||||||
/* deploy */
|
/* deploy */
|
||||||
TFCSentry sentry = spawn(TFCSentry);
|
TFCSentry sentry = spawn(TFCSentry);
|
||||||
sentry.Place(pl);
|
sentry.Place(pl);
|
||||||
|
@ -167,5 +166,5 @@ TFCSentry_Build(void)
|
||||||
void
|
void
|
||||||
TFCSentry_Dismantle(void)
|
TFCSentry_Dismantle(void)
|
||||||
{
|
{
|
||||||
TFC_DetonateTypeForPlayer((player)self, "TFCSentry");
|
TFC_DetonateTypeForPlayer((TFPlayer)self, "TFCSentry");
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,19 +42,19 @@ Game_Worldspawn(void)
|
||||||
precache_model("models/sentry3.mdl");
|
precache_model("models/sentry3.mdl");
|
||||||
precache_model("models/player.mdl");
|
precache_model("models/player.mdl");
|
||||||
precache_model("models/w_weaponbox.mdl");
|
precache_model("models/w_weaponbox.mdl");
|
||||||
Weapons_Init();
|
|
||||||
Player_Precache();
|
Player_Precache();
|
||||||
FX_Corpse_Init();
|
FX_Corpse_Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void weaponbox_spawn(player pl)
|
void weaponbox_spawn(TFPlayer pl)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CSEv_TFCBuild_i(int type)
|
CSEv_TFCBuild_i(int type)
|
||||||
{
|
{
|
||||||
player pl = (player)self;
|
TFPlayer pl = (TFPlayer)self;
|
||||||
|
|
||||||
if (pl.gflags & GF_NOBUILDZONE) {
|
if (pl.gflags & GF_NOBUILDZONE) {
|
||||||
env_message_single(pl, "#Build_nobuild");
|
env_message_single(pl, "#Build_nobuild");
|
||||||
|
|
|
@ -50,7 +50,7 @@ TFCTeamJoin_SmallestTeam(int blue, int red, int yellow, int green)
|
||||||
void
|
void
|
||||||
CSEv_TeamJoin_f(float f)
|
CSEv_TeamJoin_f(float f)
|
||||||
{
|
{
|
||||||
player pl = (player)self;
|
TFPlayer pl = (TFPlayer)self;
|
||||||
|
|
||||||
/* random... */
|
/* random... */
|
||||||
if (f == 0) {
|
if (f == 0) {
|
||||||
|
@ -119,8 +119,7 @@ CSEv_TeamJoin_f(float f)
|
||||||
void
|
void
|
||||||
CSEv_ClassJoin_f(float f)
|
CSEv_ClassJoin_f(float f)
|
||||||
{
|
{
|
||||||
|
TFPlayer pl = (TFPlayer)self;
|
||||||
player pl = (player)self;
|
|
||||||
|
|
||||||
/* choose a random class. */
|
/* choose a random class. */
|
||||||
if (f == 0) {
|
if (f == 0) {
|
||||||
|
@ -138,7 +137,7 @@ CSEv_ClassJoin_f(float f)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self.classname != "player") {
|
if (self.classname != "player") {
|
||||||
spawnfunc_player();
|
spawnfunc_TFPlayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* invalid */
|
/* invalid */
|
||||||
|
|
|
@ -24,7 +24,7 @@ TFCTeleporter:NSSurfacePropEntity
|
||||||
|
|
||||||
void(void) TFCTeleporter;
|
void(void) TFCTeleporter;
|
||||||
|
|
||||||
virtual void(player) Place;
|
virtual void(TFPlayer) Place;
|
||||||
virtual void(void) FinishPlacing;
|
virtual void(void) FinishPlacing;
|
||||||
virtual void(entity) Touch;
|
virtual void(entity) Touch;
|
||||||
};
|
};
|
||||||
|
@ -68,7 +68,7 @@ TFCTeleporter::Touch(entity eToucher)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TFCTeleporter::Place(player pl)
|
TFCTeleporter::Place(TFPlayer pl)
|
||||||
{
|
{
|
||||||
SetAngles(pl.GetAngles());
|
SetAngles(pl.GetAngles());
|
||||||
|
|
||||||
|
@ -128,14 +128,15 @@ TFCTeleporterExit::TFCTeleporterExit(void)
|
||||||
void
|
void
|
||||||
TFCTeleporter_Build(void)
|
TFCTeleporter_Build(void)
|
||||||
{
|
{
|
||||||
player pl = (player)self;
|
TFPlayer pl = (TFPlayer)self;
|
||||||
|
int cellType = ammoNumForName("ammo_cells");
|
||||||
|
|
||||||
/* only engineers can do this */
|
/* only engineers can do this */
|
||||||
if (pl.classtype != CLASS_ENGINEER)
|
if (pl.classtype != CLASS_ENGINEER)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* it costs */
|
/* it costs */
|
||||||
if (pl.m_iAmmoCells < TFC_TELEPORTER_COST) {
|
if (pl.UseAmmo(cellType, TFC_TELEPORTER_COST) == false) {
|
||||||
env_message_single(pl, "#Build_nometal");
|
env_message_single(pl, "#Build_nometal");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -151,8 +152,6 @@ TFCTeleporter_Build(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pl.m_iAmmoCells -= TFC_TELEPORTER_COST;
|
|
||||||
|
|
||||||
/* deploy */
|
/* deploy */
|
||||||
TFCTeleporter start = spawn(TFCTeleporter);
|
TFCTeleporter start = spawn(TFCTeleporter);
|
||||||
start.Place(pl);
|
start.Place(pl);
|
||||||
|
@ -161,14 +160,15 @@ TFCTeleporter_Build(void)
|
||||||
void
|
void
|
||||||
TFCTeleporterExit_Build(void)
|
TFCTeleporterExit_Build(void)
|
||||||
{
|
{
|
||||||
player pl = (player)self;
|
TFPlayer pl = (TFPlayer)self;
|
||||||
|
int cellType = ammoNumForName("ammo_cells");
|
||||||
|
|
||||||
/* only engineers can do this */
|
/* only engineers can do this */
|
||||||
if (pl.classtype != CLASS_ENGINEER)
|
if (pl.classtype != CLASS_ENGINEER)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* it costs */
|
/* it costs */
|
||||||
if (pl.m_iAmmoCells < TFC_TELEPORTER_COST) {
|
if (pl.UseAmmo(cellType, TFC_TELEPORTER_COST) == false) {
|
||||||
env_message_single(pl, "#Build_nometal");
|
env_message_single(pl, "#Build_nometal");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -184,8 +184,6 @@ TFCTeleporterExit_Build(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pl.m_iAmmoCells -= TFC_TELEPORTER_COST;
|
|
||||||
|
|
||||||
/* deploy */
|
/* deploy */
|
||||||
TFCTeleporterExit end = spawn(TFCTeleporterExit);
|
TFCTeleporterExit end = spawn(TFCTeleporterExit);
|
||||||
end.Place(pl);
|
end.Place(pl);
|
||||||
|
@ -194,10 +192,10 @@ TFCTeleporterExit_Build(void)
|
||||||
void
|
void
|
||||||
TFCTeleporter_Dismantle(void)
|
TFCTeleporter_Dismantle(void)
|
||||||
{
|
{
|
||||||
TFC_DetonateTypeForPlayer((player)self, "TFCTeleporter");
|
TFC_DetonateTypeForPlayer((TFPlayer)self, "TFCTeleporter");
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
TFCTeleporterExit_Dismantle(void)
|
TFCTeleporterExit_Dismantle(void)
|
||||||
{
|
{
|
||||||
TFC_DetonateTypeForPlayer((player)self, "TFCTeleporterExit");
|
TFC_DetonateTypeForPlayer((TFPlayer)self, "TFCTeleporterExit");
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,42 +5,15 @@ weapons.h
|
||||||
|
|
||||||
flags.h
|
flags.h
|
||||||
events.h
|
events.h
|
||||||
|
../../../valve/src/shared/player.qc
|
||||||
player.qc
|
player.qc
|
||||||
../../../valve/src/shared/weapon_common.h
|
|
||||||
../../../valve/src/shared/animations.h
|
../../../valve/src/shared/animations.h
|
||||||
animations_tfc.h
|
animations_tfc.h
|
||||||
../../../valve/src/shared/animations.qc
|
../../../valve/src/shared/animations.qc
|
||||||
|
../../../valve/src/shared/pmove.qc
|
||||||
pmove.qc
|
pmove.qc
|
||||||
|
|
||||||
../../../valve/src/shared/fx_blood.qc
|
../../../valve/src/shared/fx_blood.qc
|
||||||
../../../valve/src/shared/fx_corpse.qc
|
../../../valve/src/shared/fx_corpse.qc
|
||||||
|
../../../valve/src/shared/HLWeapon.qc
|
||||||
weapon_basesemi.qc
|
|
||||||
weapon_basemelee.qc
|
|
||||||
weapon_baseshotgun.qc
|
|
||||||
weapon_baseprojectile.qc
|
|
||||||
weapon_baseautomatic.qc
|
|
||||||
|
|
||||||
w_asscan.qc
|
|
||||||
w_autorifle.qc
|
|
||||||
w_crowbar.qc
|
|
||||||
w_dbs.qc
|
|
||||||
w_flamer.qc
|
|
||||||
w_glauncher.qc
|
|
||||||
w_grapple.qc
|
|
||||||
w_incendiary.qc
|
|
||||||
w_knife.qc
|
|
||||||
w_medkit.qc
|
|
||||||
w_nailgun.qc
|
|
||||||
w_pipebomb.qc
|
|
||||||
w_railgun.qc
|
|
||||||
w_rpg.qc
|
|
||||||
w_sbs.qc
|
|
||||||
w_sniper.qc
|
|
||||||
w_supernail.qc
|
|
||||||
w_tranquil.qc
|
|
||||||
w_umbrella.qc
|
|
||||||
w_wrench.qc
|
|
||||||
weapons.qc
|
|
||||||
../../../valve/src/shared/weapon_common.qc
|
|
||||||
#endlist
|
#endlist
|
||||||
|
|
|
@ -14,23 +14,11 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../../valve/src/shared/skeleton.h"
|
class TFPlayer:HLPlayer
|
||||||
|
|
||||||
/* all potential SendFlags bits we can possibly send */
|
|
||||||
enumflags
|
|
||||||
{
|
{
|
||||||
PLAYER_TOPFRAME = PLAYER_CUSTOMFIELDSTART,
|
|
||||||
PLAYER_BOTTOMFRAME,
|
|
||||||
PLAYER_AMMO1,
|
|
||||||
PLAYER_AMMO2,
|
|
||||||
PLAYER_AMMO3,
|
|
||||||
PLAYER_UNUSED5,
|
|
||||||
PLAYER_UNUSED6,
|
|
||||||
PLAYER_UNUSED7
|
|
||||||
};
|
|
||||||
|
|
||||||
class player:NSClientPlayer
|
void TFPlayer(void);
|
||||||
{
|
|
||||||
/* class info */
|
/* class info */
|
||||||
PREDICTED_INT(classtype)
|
PREDICTED_INT(classtype)
|
||||||
|
|
||||||
|
@ -41,26 +29,14 @@ class player:NSClientPlayer
|
||||||
PREDICTED_INT(anim_bottom)
|
PREDICTED_INT(anim_bottom)
|
||||||
PREDICTED_FLOAT(anim_bottom_time)
|
PREDICTED_FLOAT(anim_bottom_time)
|
||||||
|
|
||||||
/* ammo 1 */
|
|
||||||
PREDICTED_INT(mag_sbs)
|
|
||||||
PREDICTED_INT(mag_dbs)
|
|
||||||
PREDICTED_INT(mag_rpg)
|
|
||||||
PREDICTED_INT(mag_glauncher)
|
|
||||||
|
|
||||||
/* ammo 2 */
|
|
||||||
PREDICTED_INT(m_iAmmoRockets)
|
|
||||||
PREDICTED_INT(m_iAmmoNails)
|
|
||||||
PREDICTED_INT(m_iAmmoCells)
|
|
||||||
PREDICTED_INT(m_iAmmoShells)
|
|
||||||
PREDICTED_INT(m_iAmmoDetpack)
|
|
||||||
PREDICTED_INT(m_iAmmoMedikit)
|
|
||||||
|
|
||||||
/* ammo 3 */
|
|
||||||
PREDICTED_INT(mode_tempstate)
|
|
||||||
|
|
||||||
PREDICTED_FLOAT(m_flIdleScale)
|
PREDICTED_FLOAT(m_flIdleScale)
|
||||||
PREDICTED_FLOAT(m_flHallucination)
|
PREDICTED_FLOAT(m_flHallucination)
|
||||||
|
|
||||||
|
virtual bool CanSprint(void);
|
||||||
|
virtual bool CanCrouch(void);
|
||||||
|
virtual bool CanProne(void);
|
||||||
|
virtual bool CanLean(void);
|
||||||
|
|
||||||
virtual void Physics_Jump(void);
|
virtual void Physics_Jump(void);
|
||||||
virtual float Physics_MaxSpeed(void);
|
virtual float Physics_MaxSpeed(void);
|
||||||
|
|
||||||
|
@ -76,8 +52,7 @@ class player:NSClientPlayer
|
||||||
virtual void ReceiveEntity(float,float);
|
virtual void ReceiveEntity(float,float);
|
||||||
virtual void PredictPreFrame(void);
|
virtual void PredictPreFrame(void);
|
||||||
virtual void PredictPostFrame(void);
|
virtual void PredictPostFrame(void);
|
||||||
virtual void UpdateAliveCam(void);
|
virtual void ClientInputFrame(void);
|
||||||
virtual void UpdatePlayerAttachments(bool);
|
|
||||||
|
|
||||||
float m_flNextHallucination;
|
float m_flNextHallucination;
|
||||||
|
|
||||||
|
@ -107,11 +82,14 @@ class player:NSClientPlayer
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
void Animation_PlayerUpdate(player);
|
void
|
||||||
void Animation_TimerUpdate(player, float);
|
TFPlayer::TFPlayer(void)
|
||||||
|
{
|
||||||
|
classname = "player";
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
player::UpdatePlayerAnimation(float timelength)
|
TFPlayer::UpdatePlayerAnimation(float timelength)
|
||||||
{
|
{
|
||||||
/* calculate our skeletal progression */
|
/* calculate our skeletal progression */
|
||||||
Animation_PlayerUpdate(this);
|
Animation_PlayerUpdate(this);
|
||||||
|
@ -119,22 +97,46 @@ player::UpdatePlayerAnimation(float timelength)
|
||||||
Animation_TimerUpdate(this, timelength);
|
Animation_TimerUpdate(this, timelength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* we invalidate the next two so we can use their input_ bits, INPUT_SPRINT & PRONE */
|
||||||
|
bool
|
||||||
|
TFPlayer::CanSprint(void)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
bool
|
||||||
|
TFPlayer::CanProne(void)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
TFPlayer::CanCrouch(void)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
TFPlayer::CanLean(void)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef SERVER
|
#ifdef SERVER
|
||||||
|
|
||||||
void TFCNade_ThrowCaltrop(player);
|
void TFCNade_ThrowCaltrop(TFPlayer);
|
||||||
void TFCNade_ThrowHandGrenade(player);
|
void TFCNade_ThrowHandGrenade(TFPlayer);
|
||||||
void TFCNade_ThrowSecondary(player);
|
void TFCNade_ThrowSecondary(TFPlayer);
|
||||||
void TFCNade_SelfExplode(player);
|
void TFCNade_SelfExplode(TFPlayer);
|
||||||
|
|
||||||
void
|
void
|
||||||
player::TFC_FragSelf(void)
|
TFPlayer::TFC_FragSelf(void)
|
||||||
{
|
{
|
||||||
print("Primary exploded in your hand!\n");
|
print("Primary exploded in your hand!\n");
|
||||||
TFCNade_SelfExplode(this);
|
TFCNade_SelfExplode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
player::TFC_ThrowSecondary(void)
|
TFPlayer::TFC_ThrowSecondary(void)
|
||||||
{
|
{
|
||||||
print("Secondary exploded in your hand!\n");
|
print("Secondary exploded in your hand!\n");
|
||||||
TFCNade_ThrowSecondary(this);
|
TFCNade_ThrowSecondary(this);
|
||||||
|
@ -142,7 +144,7 @@ player::TFC_ThrowSecondary(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
player::TFC_CookGren1(void)
|
TFPlayer::TFC_CookGren1(void)
|
||||||
{
|
{
|
||||||
/* we're already cooking it */
|
/* we're already cooking it */
|
||||||
if (gflags & GF_GREN1COOK)
|
if (gflags & GF_GREN1COOK)
|
||||||
|
@ -166,7 +168,7 @@ player::TFC_CookGren1(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
player::TFC_ReleaseGren1(void)
|
TFPlayer::TFC_ReleaseGren1(void)
|
||||||
{
|
{
|
||||||
if (!(gflags & GF_GREN1COOK))
|
if (!(gflags & GF_GREN1COOK))
|
||||||
return;
|
return;
|
||||||
|
@ -188,7 +190,7 @@ player::TFC_ReleaseGren1(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
player::TFC_CookGren2(void)
|
TFPlayer::TFC_CookGren2(void)
|
||||||
{
|
{
|
||||||
if (gflags & GF_GREN2COOK)
|
if (gflags & GF_GREN2COOK)
|
||||||
return;
|
return;
|
||||||
|
@ -206,7 +208,7 @@ player::TFC_CookGren2(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
player::TFC_ReleaseGren2(void)
|
TFPlayer::TFC_ReleaseGren2(void)
|
||||||
{
|
{
|
||||||
if (!(gflags & GF_GREN2COOK))
|
if (!(gflags & GF_GREN2COOK))
|
||||||
return;
|
return;
|
||||||
|
@ -220,16 +222,16 @@ player::TFC_ReleaseGren2(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
player::ProcessInput(void)
|
TFPlayer::ProcessInput(void)
|
||||||
{
|
{
|
||||||
super::ProcessInput();
|
super::ProcessInput();
|
||||||
|
|
||||||
if (input_buttons & INPUT_BUTTON6)
|
if (input_buttons & INPUT_SPRINT)
|
||||||
TFC_CookGren1();
|
TFC_CookGren1();
|
||||||
else
|
else
|
||||||
TFC_ReleaseGren1();
|
TFC_ReleaseGren1();
|
||||||
|
|
||||||
if (input_buttons & INPUT_BUTTON7)
|
if (input_buttons & INPUT_PRONE)
|
||||||
TFC_CookGren2();
|
TFC_CookGren2();
|
||||||
else
|
else
|
||||||
TFC_ReleaseGren2();
|
TFC_ReleaseGren2();
|
||||||
|
@ -237,96 +239,8 @@ player::ProcessInput(void)
|
||||||
|
|
||||||
#ifdef CLIENT
|
#ifdef CLIENT
|
||||||
|
|
||||||
.string oldmodel;
|
|
||||||
string Weapons_GetPlayermodel(player, int);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
player::UpdatePlayerAttachments(bool visible)
|
TFPlayer::UpdateAliveCam(void)
|
||||||
{
|
|
||||||
/* draw the flashlight */
|
|
||||||
if (gflags & GF_FLASHLIGHT) {
|
|
||||||
vector src;
|
|
||||||
vector ang;
|
|
||||||
|
|
||||||
if (entnum != player_localentnum) {
|
|
||||||
src = origin + view_ofs;
|
|
||||||
ang = v_angle;
|
|
||||||
} else {
|
|
||||||
src = pSeat->m_vecPredictedOrigin + [0,0,-8];
|
|
||||||
ang = view_angles;
|
|
||||||
}
|
|
||||||
|
|
||||||
makevectors(ang);
|
|
||||||
traceline(src, src + (v_forward * 8096), MOVE_NORMAL, this);
|
|
||||||
|
|
||||||
if (serverkeyfloat("*bspversion") == BSPVER_HL) {
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FIXME: this needs to be incorporated and simplified, now that we can handle it all in-class */
|
|
||||||
if (!visible)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* what's the current weapon model supposed to be anyway? */
|
|
||||||
p_model.oldmodel = Weapons_GetPlayermodel(this, activeweapon);
|
|
||||||
|
|
||||||
/* we changed weapons, update skeletonindex */
|
|
||||||
if (p_model.model != p_model.oldmodel) {
|
|
||||||
/* free memory */
|
|
||||||
if (p_model.skeletonindex)
|
|
||||||
skel_delete(p_model.skeletonindex);
|
|
||||||
|
|
||||||
/* set the new model and mark us updated */
|
|
||||||
setmodel(p_model, p_model.oldmodel);
|
|
||||||
p_model.model = p_model.oldmodel;
|
|
||||||
|
|
||||||
/* set the new skeletonindex */
|
|
||||||
p_model.skeletonindex = skel_create(p_model.modelindex);
|
|
||||||
|
|
||||||
/* hack this thing in here FIXME: this should be done when popping in/out of a pvs */
|
|
||||||
if (autocvar(cl_himodels, 1, "Use high-quality thisayer models over lower-definition ones"))
|
|
||||||
setcustomskin(this, "", "geomset 0 2\n");
|
|
||||||
else
|
|
||||||
setcustomskin(this, "", "geomset 0 1\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* follow thisayer at all times */
|
|
||||||
setorigin(p_model, origin);
|
|
||||||
p_model.angles = angles;
|
|
||||||
skel_build(p_model.skeletonindex, p_model, p_model.modelindex,0, 0, -1);
|
|
||||||
|
|
||||||
/* we have to loop through all valid bones of the weapon model and match them
|
|
||||||
* to the thisayer one */
|
|
||||||
for (float i = 0; i < g_pbones.length; i++) {
|
|
||||||
vector bpos;
|
|
||||||
float pbone = gettagindex(this, g_pbones[i]);
|
|
||||||
float wbone = gettagindex(p_model, g_pbones[i]);
|
|
||||||
|
|
||||||
/* if the bone doesn't ignore in either skeletal mesh, ignore */
|
|
||||||
if (wbone <= 0 || pbone <= 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
bpos = gettaginfo(this, pbone);
|
|
||||||
|
|
||||||
/* the most expensive bit */
|
|
||||||
skel_set_bone_world(p_model, wbone, bpos, v_forward, v_right, v_up);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Weapons_AmmoUpdate(entity);
|
|
||||||
void HUD_AmmoNotify_Check(player pl);
|
|
||||||
void HUD_ItemNotify_Check(player pl);
|
|
||||||
void Camera_RunPosBob(vector angles, __inout vector camera_pos);
|
|
||||||
void Camera_StrafeRoll(__inout vector camera_angle);
|
|
||||||
void Shake_Update(NSClientPlayer);
|
|
||||||
|
|
||||||
void
|
|
||||||
player::UpdateAliveCam(void)
|
|
||||||
{
|
{
|
||||||
vector cam_pos = GetEyePos();
|
vector cam_pos = GetEyePos();
|
||||||
Camera_RunPosBob(view_angles, cam_pos);
|
Camera_RunPosBob(view_angles, cam_pos);
|
||||||
|
@ -361,16 +275,30 @@ player::UpdateAliveCam(void)
|
||||||
g_view.AddPunchAngle(punchangle);
|
g_view.AddPunchAngle(punchangle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
TFPlayer::ClientInputFrame(void)
|
||||||
|
{
|
||||||
|
super::ClientInputFrame();
|
||||||
|
|
||||||
|
/* we need to make sure those aren't actually handled by the server */
|
||||||
|
if (pSeatTFC->m_bInputGren1 == true) {
|
||||||
|
input_buttons |= INPUT_PRONE;
|
||||||
|
}
|
||||||
|
if (pSeatTFC->m_bInputGren2 == true) {
|
||||||
|
input_buttons |= INPUT_SPRINT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=================
|
=================
|
||||||
player::ReceiveEntity
|
player::ReceiveEntity
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
player::ReceiveEntity(float new, float flChanged)
|
TFPlayer::ReceiveEntity(float new, float flChanged)
|
||||||
{
|
{
|
||||||
/* the generic client attributes */
|
/* the generic client attributes */
|
||||||
super::ReceiveEntity(new, flChanged);
|
NSClientPlayer::ReceiveEntity(new, flChanged);
|
||||||
|
|
||||||
/* animation */
|
/* animation */
|
||||||
READENTITY_BYTE(anim_top, PLAYER_TOPFRAME)
|
READENTITY_BYTE(anim_top, PLAYER_TOPFRAME)
|
||||||
|
@ -379,22 +307,9 @@ player::ReceiveEntity(float new, float flChanged)
|
||||||
READENTITY_BYTE(anim_bottom, PLAYER_BOTTOMFRAME)
|
READENTITY_BYTE(anim_bottom, PLAYER_BOTTOMFRAME)
|
||||||
READENTITY_FLOAT(anim_bottom_time, PLAYER_BOTTOMFRAME)
|
READENTITY_FLOAT(anim_bottom_time, PLAYER_BOTTOMFRAME)
|
||||||
|
|
||||||
READENTITY_BYTE(mag_sbs, PLAYER_AMMO1)
|
READENTITY_BYTE(classtype, PLAYER_AMMOTYPES)
|
||||||
READENTITY_BYTE(mag_dbs, PLAYER_AMMO1)
|
READENTITY_FLOAT(m_flIdleScale, PLAYER_AMMOTYPES)
|
||||||
READENTITY_BYTE(mag_rpg, PLAYER_AMMO1)
|
READENTITY_FLOAT(m_flHallucination, PLAYER_AMMOTYPES)
|
||||||
READENTITY_BYTE(mag_glauncher, PLAYER_AMMO1)
|
|
||||||
|
|
||||||
READENTITY_BYTE(m_iAmmoRockets, PLAYER_AMMO2)
|
|
||||||
READENTITY_BYTE(m_iAmmoNails, PLAYER_AMMO2)
|
|
||||||
READENTITY_BYTE(m_iAmmoCells, PLAYER_AMMO2)
|
|
||||||
READENTITY_BYTE(m_iAmmoShells, PLAYER_AMMO2)
|
|
||||||
READENTITY_BYTE(m_iAmmoDetpack, PLAYER_AMMO2)
|
|
||||||
READENTITY_BYTE(m_iAmmoMedikit, PLAYER_AMMO2)
|
|
||||||
|
|
||||||
READENTITY_BYTE(mode_tempstate, PLAYER_AMMO3)
|
|
||||||
READENTITY_BYTE(classtype, PLAYER_AMMO3)
|
|
||||||
READENTITY_FLOAT(m_flIdleScale, PLAYER_AMMO3)
|
|
||||||
READENTITY_FLOAT(m_flHallucination, PLAYER_AMMO3)
|
|
||||||
|
|
||||||
setorigin(this, origin);
|
setorigin(this, origin);
|
||||||
|
|
||||||
|
@ -407,17 +322,19 @@ player::ReceiveEntity(float new, float flChanged)
|
||||||
if (flChanged == UPDATE_ALL)
|
if (flChanged == UPDATE_ALL)
|
||||||
PredictPreFrame();
|
PredictPreFrame();
|
||||||
|
|
||||||
if (flChanged & PLAYER_AMMO1 || flChanged & PLAYER_AMMO2 || flChanged & PLAYER_AMMO3) {
|
if (flChanged & PLAYER_AMMOTYPES) {
|
||||||
Weapons_AmmoUpdate(this);
|
//Weapons_AmmoUpdate(this);
|
||||||
HUD_AmmoNotify_Check(this);
|
HUD_AmmoNotify_Check(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flChanged & PLAYER_ITEMS || flChanged & PLAYER_HEALTH)
|
if (flChanged & PLAYER_ITEMS || flChanged & PLAYER_HEALTH) {
|
||||||
HUD_ItemNotify_Check(this);
|
HUD_ItemNotify_Check(this);
|
||||||
|
}
|
||||||
|
|
||||||
if (m_flHallucination > 0.0) {
|
if (m_flHallucination > 0.0) {
|
||||||
if (m_flNextHallucination > time)
|
if (m_flNextHallucination > time) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
TFCHallucination_Insert(origin, v_angle);
|
TFCHallucination_Insert(origin, v_angle);
|
||||||
m_flNextHallucination = time + 0.25f + random(0.25,0.75);
|
m_flNextHallucination = time + 0.25f + random(0.25,0.75);
|
||||||
|
@ -433,7 +350,7 @@ so we can roll them back later.
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
player::PredictPreFrame(void)
|
TFPlayer::PredictPreFrame(void)
|
||||||
{
|
{
|
||||||
/* the generic client attributes */
|
/* the generic client attributes */
|
||||||
NSClientPlayer::PredictPreFrame();
|
NSClientPlayer::PredictPreFrame();
|
||||||
|
@ -443,20 +360,6 @@ player::PredictPreFrame(void)
|
||||||
SAVE_STATE(anim_top_time)
|
SAVE_STATE(anim_top_time)
|
||||||
SAVE_STATE(anim_bottom)
|
SAVE_STATE(anim_bottom)
|
||||||
SAVE_STATE(anim_bottom_time)
|
SAVE_STATE(anim_bottom_time)
|
||||||
|
|
||||||
SAVE_STATE(mag_sbs)
|
|
||||||
SAVE_STATE(mag_dbs)
|
|
||||||
SAVE_STATE(mag_rpg)
|
|
||||||
SAVE_STATE(mag_glauncher)
|
|
||||||
|
|
||||||
SAVE_STATE(m_iAmmoRockets)
|
|
||||||
SAVE_STATE(m_iAmmoNails)
|
|
||||||
SAVE_STATE(m_iAmmoCells)
|
|
||||||
SAVE_STATE(m_iAmmoShells)
|
|
||||||
SAVE_STATE(m_iAmmoDetpack)
|
|
||||||
SAVE_STATE(m_iAmmoMedikit)
|
|
||||||
|
|
||||||
SAVE_STATE(mode_tempstate)
|
|
||||||
SAVE_STATE(classtype)
|
SAVE_STATE(classtype)
|
||||||
SAVE_STATE(m_flIdleScale)
|
SAVE_STATE(m_flIdleScale)
|
||||||
SAVE_STATE(m_flHallucination)
|
SAVE_STATE(m_flHallucination)
|
||||||
|
@ -470,7 +373,7 @@ Where we roll back our values to the ones last sent/verified by the server.
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
player::PredictPostFrame(void)
|
TFPlayer::PredictPostFrame(void)
|
||||||
{
|
{
|
||||||
/* the generic client attributes */
|
/* the generic client attributes */
|
||||||
NSClientPlayer::PredictPostFrame();
|
NSClientPlayer::PredictPostFrame();
|
||||||
|
@ -480,20 +383,6 @@ player::PredictPostFrame(void)
|
||||||
ROLL_BACK(anim_top_time)
|
ROLL_BACK(anim_top_time)
|
||||||
ROLL_BACK(anim_bottom)
|
ROLL_BACK(anim_bottom)
|
||||||
ROLL_BACK(anim_bottom_time)
|
ROLL_BACK(anim_bottom_time)
|
||||||
|
|
||||||
ROLL_BACK(mag_sbs)
|
|
||||||
ROLL_BACK(mag_dbs)
|
|
||||||
ROLL_BACK(mag_rpg)
|
|
||||||
ROLL_BACK(mag_glauncher)
|
|
||||||
|
|
||||||
ROLL_BACK(m_iAmmoRockets)
|
|
||||||
ROLL_BACK(m_iAmmoNails)
|
|
||||||
ROLL_BACK(m_iAmmoCells)
|
|
||||||
ROLL_BACK(m_iAmmoShells)
|
|
||||||
ROLL_BACK(m_iAmmoDetpack)
|
|
||||||
ROLL_BACK(m_iAmmoMedikit)
|
|
||||||
|
|
||||||
ROLL_BACK(mode_tempstate)
|
|
||||||
ROLL_BACK(classtype)
|
ROLL_BACK(classtype)
|
||||||
ROLL_BACK(m_flIdleScale)
|
ROLL_BACK(m_flIdleScale)
|
||||||
ROLL_BACK(m_flHallucination)
|
ROLL_BACK(m_flHallucination)
|
||||||
|
@ -501,7 +390,7 @@ player::PredictPostFrame(void)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
void
|
void
|
||||||
player::ServerInputFrame(void)
|
TFPlayer::ServerInputFrame(void)
|
||||||
{
|
{
|
||||||
super::ServerInputFrame();
|
super::ServerInputFrame();
|
||||||
gflags &= ~GF_NOBUILDZONE;
|
gflags &= ~GF_NOBUILDZONE;
|
||||||
|
@ -515,7 +404,7 @@ player::ServerInputFrame(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
player::EvaluateEntity(void)
|
TFPlayer::EvaluateEntity(void)
|
||||||
{
|
{
|
||||||
/* the generic client attributes */
|
/* the generic client attributes */
|
||||||
NSClientPlayer::EvaluateEntity();
|
NSClientPlayer::EvaluateEntity();
|
||||||
|
@ -527,26 +416,13 @@ player::EvaluateEntity(void)
|
||||||
EVALUATE_FIELD(anim_bottom, PLAYER_BOTTOMFRAME)
|
EVALUATE_FIELD(anim_bottom, PLAYER_BOTTOMFRAME)
|
||||||
EVALUATE_FIELD(anim_bottom_time, PLAYER_BOTTOMFRAME)
|
EVALUATE_FIELD(anim_bottom_time, PLAYER_BOTTOMFRAME)
|
||||||
|
|
||||||
EVALUATE_FIELD(mag_sbs, PLAYER_AMMO1)
|
EVALUATE_FIELD(classtype, PLAYER_AMMOTYPES)
|
||||||
EVALUATE_FIELD(mag_dbs, PLAYER_AMMO1)
|
EVALUATE_FIELD(m_flIdleScale, PLAYER_AMMOTYPES)
|
||||||
EVALUATE_FIELD(mag_rpg, PLAYER_AMMO1)
|
EVALUATE_FIELD(m_flHallucination, PLAYER_AMMOTYPES)
|
||||||
EVALUATE_FIELD(mag_glauncher, PLAYER_AMMO1)
|
|
||||||
|
|
||||||
EVALUATE_FIELD(m_iAmmoRockets, PLAYER_AMMO2)
|
|
||||||
EVALUATE_FIELD(m_iAmmoNails, PLAYER_AMMO2)
|
|
||||||
EVALUATE_FIELD(m_iAmmoCells, PLAYER_AMMO2)
|
|
||||||
EVALUATE_FIELD(m_iAmmoShells, PLAYER_AMMO2)
|
|
||||||
EVALUATE_FIELD(m_iAmmoDetpack, PLAYER_AMMO2)
|
|
||||||
EVALUATE_FIELD(m_iAmmoMedikit, PLAYER_AMMO2)
|
|
||||||
|
|
||||||
EVALUATE_FIELD(mode_tempstate, PLAYER_AMMO3)
|
|
||||||
EVALUATE_FIELD(classtype, PLAYER_AMMO3)
|
|
||||||
EVALUATE_FIELD(m_flIdleScale, PLAYER_AMMO3)
|
|
||||||
EVALUATE_FIELD(m_flHallucination, PLAYER_AMMO3)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
player::SpawnIntoGame(void)
|
TFPlayer::SpawnIntoGame(void)
|
||||||
{
|
{
|
||||||
entity spot = world;
|
entity spot = world;
|
||||||
|
|
||||||
|
@ -572,14 +448,13 @@ player::SpawnIntoGame(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
player::MakeClass(classtype_e class)
|
TFPlayer::MakeClass(classtype_e class)
|
||||||
{
|
{
|
||||||
health = self.max_health = 100;
|
int atShells = ammoNumForName("ammo_shells");
|
||||||
takedamage = DAMAGE_YES;
|
int atNails = ammoNumForName("ammo_nails");
|
||||||
solid = SOLID_SLIDEBOX;
|
int atCells = ammoNumForName("ammo_cells");
|
||||||
movetype = MOVETYPE_WALK;
|
int atRockets = ammoNumForName("ammo_rockets");
|
||||||
flags = FL_CLIENT;
|
MakePlayer();
|
||||||
viewzoom = 1.0;
|
|
||||||
|
|
||||||
/* select our class model */
|
/* select our class model */
|
||||||
model = TFC_GetModelForClasstype(classtype);
|
model = TFC_GetModelForClasstype(classtype);
|
||||||
|
@ -595,11 +470,11 @@ player::MakeClass(classtype_e class)
|
||||||
|
|
||||||
switch (classtype) {
|
switch (classtype) {
|
||||||
case CLASS_SCOUT:
|
case CLASS_SCOUT:
|
||||||
Weapons_AddItem(this, WEAPON_CROWBAR, -1);
|
GiveItem("tf_weapon_axe");
|
||||||
Weapons_AddItem(this, WEAPON_SBS, -1);
|
GiveItem("tf_weapon_shotgun");
|
||||||
Weapons_AddItem(this, WEAPON_NAILGUN, -1);
|
GiveItem("tf_weapon_ng");
|
||||||
m_iAmmoShells = 17;
|
GiveAmmo(atShells, 17i);
|
||||||
m_iAmmoNails = 100;
|
GiveAmmo(atNails, 100i);
|
||||||
|
|
||||||
m_iMaxHealth = 75;
|
m_iMaxHealth = 75;
|
||||||
m_iMaxArmor = 50;
|
m_iMaxArmor = 50;
|
||||||
|
@ -613,12 +488,12 @@ player::MakeClass(classtype_e class)
|
||||||
env_message_single(this, "HELP_SCOUT");
|
env_message_single(this, "HELP_SCOUT");
|
||||||
break;
|
break;
|
||||||
case CLASS_SNIPER:
|
case CLASS_SNIPER:
|
||||||
Weapons_AddItem(this, WEAPON_CROWBAR, -1);
|
GiveItem("tf_weapon_axe");
|
||||||
Weapons_AddItem(this, WEAPON_SNIPER, -1);
|
GiveItem("tf_weapon_sniperrifle");
|
||||||
Weapons_AddItem(this, WEAPON_AUTORIFLE, -1);
|
GiveItem("tf_weapon_autorifle");
|
||||||
Weapons_AddItem(this, WEAPON_NAILGUN, -1);
|
GiveItem("tf_weapon_ng");
|
||||||
m_iAmmoShells = 60; /* sniper rifles use shells */
|
GiveAmmo(atShells, 60i); /* sniper rifles use shells */
|
||||||
m_iAmmoNails = 50;
|
GiveAmmo(atNails, 50i);
|
||||||
|
|
||||||
m_iMaxHealth = 90;
|
m_iMaxHealth = 90;
|
||||||
m_iMaxArmor = 50;
|
m_iMaxArmor = 50;
|
||||||
|
@ -632,12 +507,12 @@ player::MakeClass(classtype_e class)
|
||||||
env_message_single(this, "HELP_SNIPER");
|
env_message_single(this, "HELP_SNIPER");
|
||||||
break;
|
break;
|
||||||
case CLASS_SOLDIER:
|
case CLASS_SOLDIER:
|
||||||
Weapons_AddItem(this, WEAPON_CROWBAR, -1);
|
GiveItem("tf_weapon_axe");
|
||||||
Weapons_AddItem(this, WEAPON_SBS, -1);
|
GiveItem("tf_weapon_supershotgun");
|
||||||
Weapons_AddItem(this, WEAPON_DBS, -1);
|
GiveItem("tf_weapon_shotgun");
|
||||||
Weapons_AddItem(this, WEAPON_RPG, -1);
|
GiveItem("tf_weapon_rpg");
|
||||||
m_iAmmoShells = 26;
|
GiveAmmo(atShells, 26i);
|
||||||
m_iAmmoRockets = 6;
|
GiveAmmo(atRockets, 6i);
|
||||||
|
|
||||||
m_iMaxHealth = 100;
|
m_iMaxHealth = 100;
|
||||||
m_iMaxArmor = 200;
|
m_iMaxArmor = 200;
|
||||||
|
@ -651,12 +526,12 @@ player::MakeClass(classtype_e class)
|
||||||
env_message_single(this, "HELP_SOLDIER");
|
env_message_single(this, "HELP_SOLDIER");
|
||||||
break;
|
break;
|
||||||
case CLASS_DEMO:
|
case CLASS_DEMO:
|
||||||
Weapons_AddItem(this, WEAPON_CROWBAR, -1);
|
GiveItem("tf_weapon_axe");
|
||||||
Weapons_AddItem(this, WEAPON_SBS, -1);
|
GiveItem("tf_weapon_supershotgun");
|
||||||
Weapons_AddItem(this, WEAPON_GLAUNCHER, -1);
|
GiveItem("tf_weapon_gl");
|
||||||
Weapons_AddItem(this, WEAPON_PIPEBOMB, -1);
|
GiveItem("tf_weapon_pl");
|
||||||
m_iAmmoShells = 22;
|
GiveAmmo(atShells, 22i);
|
||||||
m_iAmmoRockets = 14;
|
GiveAmmo(atRockets, 14i);
|
||||||
|
|
||||||
m_iMaxHealth = 90;
|
m_iMaxHealth = 90;
|
||||||
m_iMaxArmor = 100;
|
m_iMaxArmor = 100;
|
||||||
|
@ -670,12 +545,12 @@ player::MakeClass(classtype_e class)
|
||||||
env_message_single(this, "HELP_DEMOMAN");
|
env_message_single(this, "HELP_DEMOMAN");
|
||||||
break;
|
break;
|
||||||
case CLASS_MEDIC:
|
case CLASS_MEDIC:
|
||||||
Weapons_AddItem(this, WEAPON_MEDKIT, -1);
|
GiveItem("tf_weapon_medikit");
|
||||||
Weapons_AddItem(this, WEAPON_SBS, -1);
|
GiveItem("tf_weapon_supershotgun");
|
||||||
Weapons_AddItem(this, WEAPON_DBS, -1);
|
GiveItem("tf_weapon_shotgun");
|
||||||
Weapons_AddItem(this, WEAPON_SUPERNAIL, -1);
|
GiveItem("tf_weapon_superng");
|
||||||
m_iAmmoShells = 26;
|
GiveAmmo(atShells, 26i);
|
||||||
m_iAmmoNails = 50;
|
GiveAmmo(atNails, 50i);
|
||||||
|
|
||||||
m_iMaxHealth = 90;
|
m_iMaxHealth = 90;
|
||||||
m_iMaxArmor = 100;
|
m_iMaxArmor = 100;
|
||||||
|
@ -689,11 +564,11 @@ player::MakeClass(classtype_e class)
|
||||||
env_message_single(this, "HELP_MEDIC");
|
env_message_single(this, "HELP_MEDIC");
|
||||||
break;
|
break;
|
||||||
case CLASS_HVYWEAPON:
|
case CLASS_HVYWEAPON:
|
||||||
Weapons_AddItem(this, WEAPON_CROWBAR, -1);
|
GiveItem("tf_weapon_axe");
|
||||||
Weapons_AddItem(this, WEAPON_SBS, -1);
|
GiveItem("tf_weapon_supershotgun");
|
||||||
Weapons_AddItem(this, WEAPON_DBS, -1);
|
GiveItem("tf_weapon_shotgun");
|
||||||
Weapons_AddItem(this, WEAPON_ASSCAN, -1);
|
GiveItem("tf_weapon_ac");
|
||||||
m_iAmmoShells = 176; /* all of the heavy's weapons use shells */
|
GiveAmmo(atShells, 176i); /* all of the heavy's weapons use shells */
|
||||||
|
|
||||||
m_iMaxHealth = 100;
|
m_iMaxHealth = 100;
|
||||||
m_iMaxArmor = 300;
|
m_iMaxArmor = 300;
|
||||||
|
@ -707,13 +582,13 @@ player::MakeClass(classtype_e class)
|
||||||
env_message_single(this, "HELP_HWGUY");
|
env_message_single(this, "HELP_HWGUY");
|
||||||
break;
|
break;
|
||||||
case CLASS_PYRO:
|
case CLASS_PYRO:
|
||||||
Weapons_AddItem(this, WEAPON_CROWBAR, -1);
|
GiveItem("tf_weapon_axe");
|
||||||
Weapons_AddItem(this, WEAPON_SBS, -1);
|
GiveItem("tf_weapon_supershotgun");
|
||||||
Weapons_AddItem(this, WEAPON_FLAMER, -1);
|
GiveItem("tf_weapon_flamethrower");
|
||||||
Weapons_AddItem(this, WEAPON_INCENDIARY, -1);
|
GiveItem("tf_weapon_ic");
|
||||||
m_iAmmoShells = 12;
|
GiveAmmo(atShells, 12i);
|
||||||
m_iAmmoCells = 120;
|
GiveAmmo(atCells, 120i);
|
||||||
m_iAmmoRockets = 5;
|
GiveAmmo(atRockets, 5i);
|
||||||
|
|
||||||
m_iMaxHealth = 100;
|
m_iMaxHealth = 100;
|
||||||
m_iMaxArmor = 150;
|
m_iMaxArmor = 150;
|
||||||
|
@ -727,12 +602,12 @@ player::MakeClass(classtype_e class)
|
||||||
env_message_single(this, "HELP_PYRO");
|
env_message_single(this, "HELP_PYRO");
|
||||||
break;
|
break;
|
||||||
case CLASS_SPY:
|
case CLASS_SPY:
|
||||||
Weapons_AddItem(this, WEAPON_KNIFE, -1);
|
GiveItem("tf_weapon_knife");
|
||||||
Weapons_AddItem(this, WEAPON_TRANQUIL, -1);
|
GiveItem("tf_weapon_tranq");
|
||||||
Weapons_AddItem(this, WEAPON_DBS, -1);
|
GiveItem("tf_weapon_shotgun");
|
||||||
Weapons_AddItem(this, WEAPON_NAILGUN, -1);
|
GiveItem("tf_weapon_ng");
|
||||||
m_iAmmoShells = 24; /* tranquil and dbs use shells */
|
GiveAmmo(atShells, 24i); /* tranquil and dbs use shells */
|
||||||
m_iAmmoNails = 50;
|
GiveAmmo(atNails, 50i);
|
||||||
|
|
||||||
m_iMaxHealth = 90;
|
m_iMaxHealth = 90;
|
||||||
m_iMaxArmor = 100;
|
m_iMaxArmor = 100;
|
||||||
|
@ -746,12 +621,12 @@ player::MakeClass(classtype_e class)
|
||||||
env_message_single(this, "HELP_SPY");
|
env_message_single(this, "HELP_SPY");
|
||||||
break;
|
break;
|
||||||
case CLASS_ENGINEER:
|
case CLASS_ENGINEER:
|
||||||
Weapons_AddItem(this, WEAPON_WRENCH, -1);
|
GiveItem("tf_weapon_spanner");
|
||||||
Weapons_AddItem(this, WEAPON_RAILGUN, -1);
|
GiveItem("tf_weapon_railgun");
|
||||||
Weapons_AddItem(this, WEAPON_DBS, -1);
|
GiveItem("tf_weapon_shotgun");
|
||||||
m_iAmmoCells = 100;
|
GiveAmmo(atCells, 100i);
|
||||||
m_iAmmoNails = 25;
|
GiveAmmo(atNails, 25i);
|
||||||
m_iAmmoShells = 4;
|
GiveAmmo(atShells, 4i);
|
||||||
|
|
||||||
m_iMaxHealth = 80;
|
m_iMaxHealth = 80;
|
||||||
m_iMaxArmor = 50;
|
m_iMaxArmor = 50;
|
||||||
|
@ -766,7 +641,7 @@ player::MakeClass(classtype_e class)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_items |= ITEM_SUIT;
|
GiveItem("item_suit");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -775,7 +650,7 @@ player::SendEntity
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
float
|
float
|
||||||
player::SendEntity(entity ePEnt, float flChanged)
|
TFPlayer::SendEntity(entity ePEnt, float flChanged)
|
||||||
{
|
{
|
||||||
/* don't broadcast invisible players */
|
/* don't broadcast invisible players */
|
||||||
if (IsFakeSpectator() && ePEnt != this)
|
if (IsFakeSpectator() && ePEnt != this)
|
||||||
|
@ -785,9 +660,6 @@ player::SendEntity(entity ePEnt, float flChanged)
|
||||||
|
|
||||||
flChanged = OptimiseChangedFlags(ePEnt, flChanged);
|
flChanged = OptimiseChangedFlags(ePEnt, flChanged);
|
||||||
|
|
||||||
WriteByte(MSG_ENTITY, ENT_PLAYER);
|
|
||||||
WriteFloat(MSG_ENTITY, flChanged);
|
|
||||||
|
|
||||||
/* the generic client attributes */
|
/* the generic client attributes */
|
||||||
NSClientPlayer::SendEntity(ePEnt, flChanged);
|
NSClientPlayer::SendEntity(ePEnt, flChanged);
|
||||||
|
|
||||||
|
@ -797,22 +669,9 @@ player::SendEntity(entity ePEnt, float flChanged)
|
||||||
SENDENTITY_BYTE(anim_bottom, PLAYER_BOTTOMFRAME)
|
SENDENTITY_BYTE(anim_bottom, PLAYER_BOTTOMFRAME)
|
||||||
SENDENTITY_FLOAT(anim_bottom_time, PLAYER_BOTTOMFRAME)
|
SENDENTITY_FLOAT(anim_bottom_time, PLAYER_BOTTOMFRAME)
|
||||||
|
|
||||||
SENDENTITY_BYTE(mag_sbs, PLAYER_AMMO1)
|
SENDENTITY_BYTE(classtype, PLAYER_AMMOTYPES)
|
||||||
SENDENTITY_BYTE(mag_dbs, PLAYER_AMMO1)
|
SENDENTITY_FLOAT(m_flIdleScale, PLAYER_AMMOTYPES)
|
||||||
SENDENTITY_BYTE(mag_rpg, PLAYER_AMMO1)
|
SENDENTITY_FLOAT(m_flHallucination, PLAYER_AMMOTYPES)
|
||||||
SENDENTITY_BYTE(mag_glauncher, PLAYER_AMMO1)
|
|
||||||
|
|
||||||
SENDENTITY_BYTE(m_iAmmoRockets, PLAYER_AMMO2)
|
|
||||||
SENDENTITY_BYTE(m_iAmmoNails, PLAYER_AMMO2)
|
|
||||||
SENDENTITY_BYTE(m_iAmmoCells, PLAYER_AMMO2)
|
|
||||||
SENDENTITY_BYTE(m_iAmmoShells, PLAYER_AMMO2)
|
|
||||||
SENDENTITY_BYTE(m_iAmmoDetpack, PLAYER_AMMO2)
|
|
||||||
SENDENTITY_BYTE(m_iAmmoMedikit, PLAYER_AMMO2)
|
|
||||||
|
|
||||||
SENDENTITY_BYTE(mode_tempstate, PLAYER_AMMO3)
|
|
||||||
SENDENTITY_BYTE(classtype, PLAYER_AMMO3)
|
|
||||||
SENDENTITY_FLOAT(m_flIdleScale, PLAYER_AMMO3)
|
|
||||||
SENDENTITY_FLOAT(m_flHallucination, PLAYER_AMMO3)
|
|
||||||
|
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#define PHY_VIEWPOS_CROUCHED [0,0,12]
|
#define PHY_VIEWPOS_CROUCHED [0,0,12]
|
||||||
|
|
||||||
void
|
void
|
||||||
player::Physics_Jump(void)
|
TFPlayer::Physics_Jump(void)
|
||||||
{
|
{
|
||||||
if (waterlevel >= 2) {
|
if (waterlevel >= 2) {
|
||||||
if (watertype == CONTENT_WATER) {
|
if (watertype == CONTENT_WATER) {
|
||||||
|
@ -51,7 +51,7 @@ player::Physics_Jump(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
player::Physics_MaxSpeed(void)
|
TFPlayer::Physics_MaxSpeed(void)
|
||||||
{
|
{
|
||||||
float desiredspeed = 300.0f;
|
float desiredspeed = 300.0f;
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ player::Physics_MaxSpeed(void)
|
||||||
desiredspeed = 300.0f;
|
desiredspeed = 300.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetFlags() & FL_CROUCHING)
|
if (IsCrouching())
|
||||||
desiredspeed /= 3;
|
desiredspeed /= 3;
|
||||||
|
|
||||||
return desiredspeed;
|
return desiredspeed;
|
||||||
|
|
|
@ -177,7 +177,7 @@ w_asscan_primary(player pl)
|
||||||
Weapons_ViewPunchAngle(pl, [random(-2, 2),0,0]);
|
Weapons_ViewPunchAngle(pl, [random(-2, 2),0,0]);
|
||||||
Weapons_Sound(pl, CHAN_WEAPON, "weapon_asscan.fire");
|
Weapons_Sound(pl, CHAN_WEAPON, "weapon_asscan.fire");
|
||||||
|
|
||||||
if (pl.flags & FL_CROUCHING)
|
if (pl.IsCrouching())
|
||||||
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTASSCAN, 0.1f);
|
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTASSCAN, 0.1f);
|
||||||
else
|
else
|
||||||
Animation_PlayerTop(pl, TFCANIM_SHOOTASSCAN, 0.1f);
|
Animation_PlayerTop(pl, TFCANIM_SHOOTASSCAN, 0.1f);
|
||||||
|
@ -212,7 +212,7 @@ w_asscan_hud(player pl)
|
||||||
float
|
float
|
||||||
w_asscan_aimanim(player pl)
|
w_asscan_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? TFCANIM_CR_AIMASSCAN : TFCANIM_AIMASSCAN;
|
return pl.IsCrouching() ? TFCANIM_CR_AIMASSCAN : TFCANIM_AIMASSCAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -78,7 +78,7 @@ w_autorifle_draw(player pl)
|
||||||
float
|
float
|
||||||
w_autorifle_aimanim(player pl)
|
w_autorifle_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? TFCANIM_CR_AIMAUTOSNIPER : TFCANIM_AIMAUTOSNIPER;
|
return pl.IsCrouching() ? TFCANIM_CR_AIMAUTOSNIPER : TFCANIM_AIMAUTOSNIPER;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -94,7 +94,7 @@ w_autorifle_primary(player pl)
|
||||||
case AUTO_LAST:
|
case AUTO_LAST:
|
||||||
Weapons_ViewAnimation(pl, SNIPER_AUTOFIRE);
|
Weapons_ViewAnimation(pl, SNIPER_AUTOFIRE);
|
||||||
|
|
||||||
if (pl.flags & FL_CROUCHING)
|
if (pl.IsCrouching())
|
||||||
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTAUTOSNIPER, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTAUTOSNIPER, 0.45f);
|
||||||
else
|
else
|
||||||
Animation_PlayerTop(pl, TFCANIM_SHOOTAUTOSNIPER, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_SHOOTAUTOSNIPER, 0.45f);
|
||||||
|
|
|
@ -124,7 +124,7 @@ w_crowbar_primary(player pl)
|
||||||
Weapons_ViewAnimation(pl, trace_fraction >= 1 ? CBAR_ATTACK3MISS:CBAR_ATTACK3HIT);
|
Weapons_ViewAnimation(pl, trace_fraction >= 1 ? CBAR_ATTACK3MISS:CBAR_ATTACK3HIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pl.flags & FL_CROUCHING)
|
if (pl.IsCrouching())
|
||||||
Animation_PlayerTop(pl, ANIM_CR_SHOOTCROWBAR, 0.41f);
|
Animation_PlayerTop(pl, ANIM_CR_SHOOTCROWBAR, 0.41f);
|
||||||
else
|
else
|
||||||
Animation_PlayerTop(pl, ANIM_SHOOTCROWBAR, 0.5f);
|
Animation_PlayerTop(pl, ANIM_SHOOTCROWBAR, 0.5f);
|
||||||
|
@ -169,7 +169,7 @@ w_crowbar_release(player pl)
|
||||||
float
|
float
|
||||||
w_crowbar_aimanim(player pl)
|
w_crowbar_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? ANIM_CR_AIMCROWBAR : ANIM_AIMCROWBAR;
|
return pl.IsCrouching() ? ANIM_CR_AIMCROWBAR : ANIM_AIMCROWBAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -107,7 +107,7 @@ w_dbs_primary(player pl)
|
||||||
Weapons_ViewAnimation(pl, DBS_FIRE1);
|
Weapons_ViewAnimation(pl, DBS_FIRE1);
|
||||||
Weapons_ViewPunchAngle(pl, [-2,0,0]);
|
Weapons_ViewPunchAngle(pl, [-2,0,0]);
|
||||||
|
|
||||||
if (pl.flags & FL_CROUCHING)
|
if (pl.IsCrouching())
|
||||||
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTSHOTGUN, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTSHOTGUN, 0.45f);
|
||||||
else
|
else
|
||||||
Animation_PlayerTop(pl, TFCANIM_SHOOTSHOTGUN, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_SHOOTSHOTGUN, 0.45f);
|
||||||
|
@ -181,7 +181,7 @@ w_dbs_crosshair(player pl)
|
||||||
float
|
float
|
||||||
w_dbs_aimanim(player pl)
|
w_dbs_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? ANIM_CR_AIMSHOTGUN : ANIM_AIMSHOTGUN;
|
return pl.IsCrouching() ? ANIM_CR_AIMSHOTGUN : ANIM_AIMSHOTGUN;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -170,7 +170,7 @@ w_flamer_crosshair(player pl)
|
||||||
float
|
float
|
||||||
w_flamer_aimanim(player pl)
|
w_flamer_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? TFCANIM_CR_AIMEGON : TFCANIM_AIMEGON;
|
return pl.IsCrouching() ? TFCANIM_CR_AIMEGON : TFCANIM_AIMEGON;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -174,7 +174,7 @@ w_glauncher_primary(player pl)
|
||||||
Weapons_ViewAnimation(pl, GLAUNCHER_GFIRE);
|
Weapons_ViewAnimation(pl, GLAUNCHER_GFIRE);
|
||||||
Weapons_ViewPunchAngle(pl, [-1,0,0]);
|
Weapons_ViewPunchAngle(pl, [-1,0,0]);
|
||||||
|
|
||||||
if (pl.flags & FL_CROUCHING)
|
if (pl.IsCrouching())
|
||||||
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTSHOTGUN, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTSHOTGUN, 0.45f);
|
||||||
else
|
else
|
||||||
Animation_PlayerTop(pl, TFCANIM_SHOOTSHOTGUN, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_SHOOTSHOTGUN, 0.45f);
|
||||||
|
@ -220,7 +220,7 @@ w_glauncher_postdraw(player pl)
|
||||||
float
|
float
|
||||||
w_glauncher_aimanim(player pl)
|
w_glauncher_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? TFCANIM_CR_AIMSHOTGUN : TFCANIM_AIMSHOTGUN;
|
return pl.IsCrouching() ? TFCANIM_CR_AIMSHOTGUN : TFCANIM_AIMSHOTGUN;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -57,7 +57,7 @@ w_grapple_draw(player pl)
|
||||||
float
|
float
|
||||||
w_grapple_aimanim(player pl)
|
w_grapple_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? ANIM_CR_AIMCROWBAR : ANIM_AIMCROWBAR;
|
return pl.IsCrouching() ? ANIM_CR_AIMCROWBAR : ANIM_AIMCROWBAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -113,7 +113,7 @@ w_incendiary_primary(player pl)
|
||||||
Weapons_Sound(pl, CHAN_WEAPON, "weapon_incendiary.fire");
|
Weapons_Sound(pl, CHAN_WEAPON, "weapon_incendiary.fire");
|
||||||
Weapons_ViewPunchAngle(pl, [-2,0,0]);
|
Weapons_ViewPunchAngle(pl, [-2,0,0]);
|
||||||
|
|
||||||
if (pl.flags & FL_CROUCHING)
|
if (pl.IsCrouching())
|
||||||
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTRPG, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTRPG, 0.45f);
|
||||||
else
|
else
|
||||||
Animation_PlayerTop(pl, TFCANIM_SHOOTRPG, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_SHOOTRPG, 0.45f);
|
||||||
|
@ -131,7 +131,7 @@ w_incendiary_primary(player pl)
|
||||||
float
|
float
|
||||||
w_incendiary_aimanim(player pl)
|
w_incendiary_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? TFCANIM_CR_AIMRPG : TFCANIM_AIMRPG;
|
return pl.IsCrouching() ? TFCANIM_CR_AIMRPG : TFCANIM_AIMRPG;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -99,7 +99,7 @@ w_knife_primary(player pl)
|
||||||
|
|
||||||
Weapons_ViewAnimation(pl, KNIFE_SLASH);
|
Weapons_ViewAnimation(pl, KNIFE_SLASH);
|
||||||
|
|
||||||
if (pl.flags & FL_CROUCHING)
|
if (pl.IsCrouching())
|
||||||
Animation_PlayerTop(pl, ANIM_CR_SHOOTCROWBAR, 0.41f);
|
Animation_PlayerTop(pl, ANIM_CR_SHOOTCROWBAR, 0.41f);
|
||||||
else
|
else
|
||||||
Animation_PlayerTop(pl, ANIM_SHOOTCROWBAR, 0.5f);
|
Animation_PlayerTop(pl, ANIM_SHOOTCROWBAR, 0.5f);
|
||||||
|
@ -144,7 +144,7 @@ w_knife_primary(player pl)
|
||||||
float
|
float
|
||||||
w_knife_aimanim(player pl)
|
w_knife_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? ANIM_CR_AIMCROWBAR : ANIM_AIMCROWBAR;
|
return pl.IsCrouching() ? ANIM_CR_AIMCROWBAR : ANIM_AIMCROWBAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -80,7 +80,7 @@ w_medkit_primary(player pl)
|
||||||
|
|
||||||
Weapons_ViewAnimation(pl, MEDKIT_USE);
|
Weapons_ViewAnimation(pl, MEDKIT_USE);
|
||||||
|
|
||||||
if (pl.flags & FL_CROUCHING)
|
if (pl.IsCrouching())
|
||||||
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTMEDKIT, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTMEDKIT, 0.45f);
|
||||||
else
|
else
|
||||||
Animation_PlayerTop(pl, TFCANIM_SHOOTMEDKIT, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_SHOOTMEDKIT, 0.45f);
|
||||||
|
@ -131,7 +131,7 @@ w_medkit_release(player pl)
|
||||||
float
|
float
|
||||||
w_medkit_aimanim(player pl)
|
w_medkit_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? TFCANIM_CR_AIMMEDKIT : TFCANIM_AIMMEDKIT;
|
return pl.IsCrouching() ? TFCANIM_CR_AIMMEDKIT : TFCANIM_AIMMEDKIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -69,7 +69,7 @@ w_nailgun_draw(player pl)
|
||||||
float
|
float
|
||||||
w_nailgun_aimanim(player pl)
|
w_nailgun_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? TFCANIM_CR_AIMMP5 : TFCANIM_AIMMP5;
|
return pl.IsCrouching() ? TFCANIM_CR_AIMMP5 : TFCANIM_AIMMP5;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -126,7 +126,7 @@ w_nailgun_primary(player pl)
|
||||||
Weapons_ViewAnimation(pl, NAILGUN_SHOOT2);
|
Weapons_ViewAnimation(pl, NAILGUN_SHOOT2);
|
||||||
Weapons_ViewPunchAngle(pl, [-1,0,0]);
|
Weapons_ViewPunchAngle(pl, [-1,0,0]);
|
||||||
|
|
||||||
if (pl.flags & FL_CROUCHING)
|
if (pl.IsCrouching())
|
||||||
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTMP5, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTMP5, 0.45f);
|
||||||
else
|
else
|
||||||
Animation_PlayerTop(pl, TFCANIM_SHOOTMP5, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_SHOOTMP5, 0.45f);
|
||||||
|
|
|
@ -182,7 +182,7 @@ w_pipebomb_primary(player pl)
|
||||||
Weapons_ViewAnimation(pl, GLAUNCHER_PFIRE);
|
Weapons_ViewAnimation(pl, GLAUNCHER_PFIRE);
|
||||||
Weapons_ViewPunchAngle(pl, [-1,0,0]);
|
Weapons_ViewPunchAngle(pl, [-1,0,0]);
|
||||||
|
|
||||||
if (pl.flags & FL_CROUCHING)
|
if (pl.IsCrouching())
|
||||||
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTSHOTGUN, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTSHOTGUN, 0.45f);
|
||||||
else
|
else
|
||||||
Animation_PlayerTop(pl, TFCANIM_SHOOTSHOTGUN, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_SHOOTSHOTGUN, 0.45f);
|
||||||
|
@ -250,7 +250,7 @@ w_pipebomb_postdraw(player pl)
|
||||||
float
|
float
|
||||||
w_pipebomb_aimanim(player pl)
|
w_pipebomb_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? TFCANIM_CR_AIMSHOTGUN : TFCANIM_AIMSHOTGUN;
|
return pl.IsCrouching() ? TFCANIM_CR_AIMSHOTGUN : TFCANIM_AIMSHOTGUN;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -65,7 +65,7 @@ w_railgun_draw(player pl)
|
||||||
float
|
float
|
||||||
w_railgun_aimanim(player pl)
|
w_railgun_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? TFCANIM_CR_AIM1HAND : TFCANIM_AIM1HAND;
|
return pl.IsCrouching() ? TFCANIM_CR_AIM1HAND : TFCANIM_AIM1HAND;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -119,7 +119,7 @@ w_railgun_primary(player pl)
|
||||||
Weapons_ViewAnimation(pl, RAILGUN_SHOOT);
|
Weapons_ViewAnimation(pl, RAILGUN_SHOOT);
|
||||||
Weapons_ViewPunchAngle(pl, [-1,0,0]);
|
Weapons_ViewPunchAngle(pl, [-1,0,0]);
|
||||||
|
|
||||||
if (pl.flags & FL_CROUCHING)
|
if (pl.IsCrouching())
|
||||||
Animation_PlayerTop(pl, TFCANIM_CR_SHOOT1HAND, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_CR_SHOOT1HAND, 0.45f);
|
||||||
else
|
else
|
||||||
Animation_PlayerTop(pl, TFCANIM_SHOOT1HAND, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_SHOOT1HAND, 0.45f);
|
||||||
|
|
|
@ -120,7 +120,7 @@ w_rpg_primary(player pl)
|
||||||
Weapons_ViewPunchAngle(pl, [-2,0,0]);
|
Weapons_ViewPunchAngle(pl, [-2,0,0]);
|
||||||
Weapons_Sound(pl, CHAN_WEAPON, "weapon_rpg.fire");
|
Weapons_Sound(pl, CHAN_WEAPON, "weapon_rpg.fire");
|
||||||
|
|
||||||
if (pl.flags & FL_CROUCHING)
|
if (pl.IsCrouching())
|
||||||
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTRPG, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTRPG, 0.45f);
|
||||||
else
|
else
|
||||||
Animation_PlayerTop(pl, TFCANIM_SHOOTRPG, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_SHOOTRPG, 0.45f);
|
||||||
|
@ -175,7 +175,7 @@ w_rpg_release(player pl)
|
||||||
float
|
float
|
||||||
w_rpg_aimanim(player pl)
|
w_rpg_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? TFCANIM_CR_AIMRPG : TFCANIM_AIMRPG;
|
return pl.IsCrouching() ? TFCANIM_CR_AIMRPG : TFCANIM_AIMRPG;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -98,7 +98,7 @@ w_sbs_primary(player pl)
|
||||||
Weapons_ViewAnimation(pl, SBS_FIRE1);
|
Weapons_ViewAnimation(pl, SBS_FIRE1);
|
||||||
Weapons_ViewPunchAngle(pl, [-2,0,0]);
|
Weapons_ViewPunchAngle(pl, [-2,0,0]);
|
||||||
|
|
||||||
if (pl.flags & FL_CROUCHING)
|
if (pl.IsCrouching())
|
||||||
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTSHOTGUN, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTSHOTGUN, 0.45f);
|
||||||
else
|
else
|
||||||
Animation_PlayerTop(pl, TFCANIM_SHOOTSHOTGUN, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_SHOOTSHOTGUN, 0.45f);
|
||||||
|
@ -169,7 +169,7 @@ w_sbs_crosshair(player pl)
|
||||||
float
|
float
|
||||||
w_sbs_aimanim(player pl)
|
w_sbs_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? ANIM_CR_AIMSHOTGUN : ANIM_AIMSHOTGUN;
|
return pl.IsCrouching() ? ANIM_CR_AIMSHOTGUN : ANIM_AIMSHOTGUN;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -69,7 +69,7 @@ w_sniper_draw(player pl)
|
||||||
float
|
float
|
||||||
w_sniper_aimanim(player pl)
|
w_sniper_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? TFCANIM_CR_AIMSNIPER : TFCANIM_AIMSNIPER;
|
return pl.IsCrouching() ? TFCANIM_CR_AIMSNIPER : TFCANIM_AIMSNIPER;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -83,7 +83,7 @@ w_sniper_release(player pl)
|
||||||
w_baseauto_fire(WEAPON_SNIPER, player::m_iAmmoShells, dmg, [0,0]);
|
w_baseauto_fire(WEAPON_SNIPER, player::m_iAmmoShells, dmg, [0,0]);
|
||||||
Weapons_ViewAnimation(pl, SNIPER_FIRE);
|
Weapons_ViewAnimation(pl, SNIPER_FIRE);
|
||||||
|
|
||||||
if (pl.flags & FL_CROUCHING)
|
if (pl.IsCrouching())
|
||||||
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTSNIPER, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTSNIPER, 0.45f);
|
||||||
else
|
else
|
||||||
Animation_PlayerTop(pl, TFCANIM_SHOOTSNIPER, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_SHOOTSNIPER, 0.45f);
|
||||||
|
@ -154,20 +154,20 @@ w_sniper_postdraw(player pl)
|
||||||
|
|
||||||
if (pl.mode_tempstate) {
|
if (pl.mode_tempstate) {
|
||||||
vector laser_pos;
|
vector laser_pos;
|
||||||
float lerp;
|
float lerpF;
|
||||||
vector jitter = [0.0f, 0.0f, 0.0f];
|
vector jitter = [0.0f, 0.0f, 0.0f];
|
||||||
Weapons_MakeVectors(pl);
|
Weapons_MakeVectors(pl);
|
||||||
vector src = pl.origin + pl.view_ofs;
|
vector src = pl.origin + pl.view_ofs;
|
||||||
float a = bound(0.0, (pl.mode_tempstate / 10), 1.0) * 0.75;
|
float a = bound(0.0, (pl.mode_tempstate / 10), 1.0) * 0.75;
|
||||||
traceline(src, src + (v_forward * 256), FALSE, pl);
|
traceline(src, src + (v_forward * 256), FALSE, pl);
|
||||||
lerp = Math_Lerp(32,16, trace_fraction);
|
lerpF = lerp(32,16, trace_fraction);
|
||||||
jitter[0] = (random(0,2) - 2) * (1 - trace_fraction);
|
jitter[0] = (random(0,2) - 2) * (1 - trace_fraction);
|
||||||
jitter[1] = (random(0,2) - 2) * (1 - trace_fraction);
|
jitter[1] = (random(0,2) - 2) * (1 - trace_fraction);
|
||||||
laser_pos = g_hudmins + (g_hudres / 2) + ([-lerp,-lerp] / 2);
|
laser_pos = g_hudmins + (g_hudres / 2) + ([-lerpF,-lerpF] / 2);
|
||||||
|
|
||||||
drawsubpic(
|
drawsubpic(
|
||||||
laser_pos + jitter,
|
laser_pos + jitter,
|
||||||
[lerp,lerp],
|
[lerpF,lerpF],
|
||||||
g_laser_spr,
|
g_laser_spr,
|
||||||
[0,0],
|
[0,0],
|
||||||
[1.0, 1.0],
|
[1.0, 1.0],
|
||||||
|
|
|
@ -72,7 +72,7 @@ w_supernail_draw(player pl)
|
||||||
float
|
float
|
||||||
w_supernail_aimanim(player pl)
|
w_supernail_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? TFCANIM_CR_AIMMP5 : TFCANIM_AIMMP5;
|
return pl.IsCrouching() ? TFCANIM_CR_AIMMP5 : TFCANIM_AIMMP5;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -129,7 +129,7 @@ w_supernail_primary(player pl)
|
||||||
Weapons_ViewAnimation(pl, NAILGUN_SHOOT2);
|
Weapons_ViewAnimation(pl, NAILGUN_SHOOT2);
|
||||||
Weapons_ViewPunchAngle(pl, [-1,0,0]);
|
Weapons_ViewPunchAngle(pl, [-1,0,0]);
|
||||||
|
|
||||||
if (pl.flags & FL_CROUCHING)
|
if (pl.IsCrouching())
|
||||||
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTMP5, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_CR_SHOOTMP5, 0.45f);
|
||||||
else
|
else
|
||||||
Animation_PlayerTop(pl, TFCANIM_SHOOTMP5, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_SHOOTMP5, 0.45f);
|
||||||
|
|
|
@ -114,7 +114,7 @@ w_tranquil_primary(player pl)
|
||||||
Weapons_ViewPunchAngle(pl, [-2,0,0]);
|
Weapons_ViewPunchAngle(pl, [-2,0,0]);
|
||||||
Weapons_Sound(pl, CHAN_WEAPON, "weapon_tranquilizer.fire");
|
Weapons_Sound(pl, CHAN_WEAPON, "weapon_tranquilizer.fire");
|
||||||
|
|
||||||
if (pl.flags & FL_CROUCHING)
|
if (pl.IsCrouching())
|
||||||
Animation_PlayerTop(pl, TFCANIM_CR_SHOOT1HAND, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_CR_SHOOT1HAND, 0.45f);
|
||||||
else
|
else
|
||||||
Animation_PlayerTop(pl, TFCANIM_SHOOT1HAND, 0.45f);
|
Animation_PlayerTop(pl, TFCANIM_SHOOT1HAND, 0.45f);
|
||||||
|
@ -132,7 +132,7 @@ w_tranquil_primary(player pl)
|
||||||
float
|
float
|
||||||
w_tranquil_aimanim(player pl)
|
w_tranquil_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? TFCANIM_CR_AIM1HAND : TFCANIM_AIM1HAND;
|
return pl.IsCrouching() ? TFCANIM_CR_AIM1HAND : TFCANIM_AIM1HAND;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -118,7 +118,7 @@ w_umbrella_primary(player pl)
|
||||||
pl.w_idle_next = 2.5f;
|
pl.w_idle_next = 2.5f;
|
||||||
|
|
||||||
#ifdef SERVER
|
#ifdef SERVER
|
||||||
if (pl.flags & FL_CROUCHING) {
|
if (pl.IsCrouching()) {
|
||||||
Animation_PlayerTop(pl, ANIM_SHOOTCROWBAR, 0.5f);
|
Animation_PlayerTop(pl, ANIM_SHOOTCROWBAR, 0.5f);
|
||||||
} else {
|
} else {
|
||||||
Animation_PlayerTop(pl, ANIM_CR_SHOOTCROWBAR, 0.42f);
|
Animation_PlayerTop(pl, ANIM_CR_SHOOTCROWBAR, 0.42f);
|
||||||
|
@ -176,7 +176,7 @@ w_umbrella_release(player pl)
|
||||||
float
|
float
|
||||||
w_umbrella_aimanim(player pl)
|
w_umbrella_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? ANIM_CR_AIMCROWBAR : ANIM_AIMCROWBAR;
|
return pl.IsCrouching() ? ANIM_CR_AIMCROWBAR : ANIM_AIMCROWBAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -107,7 +107,7 @@ w_wrench_primary(player pl)
|
||||||
pl.w_idle_next = 2.5f;
|
pl.w_idle_next = 2.5f;
|
||||||
|
|
||||||
#ifdef SERVER
|
#ifdef SERVER
|
||||||
if (pl.flags & FL_CROUCHING) {
|
if (pl.IsCrouching()) {
|
||||||
Animation_PlayerTop(pl, ANIM_SHOOTCROWBAR, 0.5f);
|
Animation_PlayerTop(pl, ANIM_SHOOTCROWBAR, 0.5f);
|
||||||
} else {
|
} else {
|
||||||
Animation_PlayerTop(pl, ANIM_CR_SHOOTCROWBAR, 0.42f);
|
Animation_PlayerTop(pl, ANIM_CR_SHOOTCROWBAR, 0.42f);
|
||||||
|
@ -191,7 +191,7 @@ w_wrench_crosshair(player pl)
|
||||||
float
|
float
|
||||||
w_wrench_aimanim(player pl)
|
w_wrench_aimanim(player pl)
|
||||||
{
|
{
|
||||||
return pl.flags & FL_CROUCHING ? ANIM_CR_AIMCROWBAR : ANIM_AIMCROWBAR;
|
return pl.IsCrouching() ? ANIM_CR_AIMCROWBAR : ANIM_AIMCROWBAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
1
zpak001.pk3dir/PAK_NAME
Normal file
1
zpak001.pk3dir/PAK_NAME
Normal file
|
@ -0,0 +1 @@
|
||||||
|
package_tfc.pk3
|
30
zpak001.pk3dir/def/ammo.def
Normal file
30
zpak001.pk3dir/def/ammo.def
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
// these have to be defined by the game.
|
||||||
|
entityDef ammo_types {
|
||||||
|
"ammo_none" "0"
|
||||||
|
"ammo_rockets" "1"
|
||||||
|
"ammo_nails" "2"
|
||||||
|
"ammo_cells" "3"
|
||||||
|
"ammo_shells" "4"
|
||||||
|
"ammo_medkits" "5"
|
||||||
|
"ammo_detpack" "6"
|
||||||
|
}
|
||||||
|
|
||||||
|
entityDef ammo_names {
|
||||||
|
"ammo_none" "None"
|
||||||
|
"ammo_rockets" "Rockets"
|
||||||
|
"ammo_nails" "Nails"
|
||||||
|
"ammo_cells" "Cells"
|
||||||
|
"ammo_shells" "Shells"
|
||||||
|
"ammo_medkits" "Medkit"
|
||||||
|
"ammo_detpack" "Depack"
|
||||||
|
}
|
||||||
|
|
||||||
|
entityDef ammo_max {
|
||||||
|
"ammo_none" "0"
|
||||||
|
"ammo_rockets" "255"
|
||||||
|
"ammo_nails" "255"
|
||||||
|
"ammo_cells" "255"
|
||||||
|
"ammo_shells" "255"
|
||||||
|
"ammo_medkits" "255"
|
||||||
|
"ammo_detpack" "255"
|
||||||
|
}
|
8
zpak001.pk3dir/def/items.def
Normal file
8
zpak001.pk3dir/def/items.def
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
entityDef item_suit
|
||||||
|
{
|
||||||
|
"spawnclass" "NSItem"
|
||||||
|
"model" "models/w_suit.mdl"
|
||||||
|
"mins" "-16 -16 0"
|
||||||
|
"maxs" "16 16 16"
|
||||||
|
"inv_carry" "1"
|
||||||
|
}
|
4
zpak001.pk3dir/def/player.def
Normal file
4
zpak001.pk3dir/def/player.def
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
entityDef player
|
||||||
|
{
|
||||||
|
"spawnclass" "TFPlayer"
|
||||||
|
}
|
18
zpak001.pk3dir/def/weapons.def
Normal file
18
zpak001.pk3dir/def/weapons.def
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#include "weapons/ac.def"
|
||||||
|
#include "weapons/autorifle.def"
|
||||||
|
#include "weapons/axe.def"
|
||||||
|
#include "weapons/flamethrower.def"
|
||||||
|
#include "weapons/gl.def"
|
||||||
|
#include "weapons/ic.def"
|
||||||
|
#include "weapons/knife.def"
|
||||||
|
#include "weapons/medikit.def"
|
||||||
|
#include "weapons/ng.def"
|
||||||
|
#include "weapons/pl.def"
|
||||||
|
#include "weapons/railgun.def"
|
||||||
|
#include "weapons/rpg.def"
|
||||||
|
#include "weapons/shotgun.def"
|
||||||
|
#include "weapons/sniperrifle.def"
|
||||||
|
#include "weapons/spanner.def"
|
||||||
|
#include "weapons/superng.def"
|
||||||
|
#include "weapons/supershotgun.def"
|
||||||
|
#include "weapons/tranq.def"
|
43
zpak001.pk3dir/def/weapons/ac.def
Normal file
43
zpak001.pk3dir/def/weapons/ac.def
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
entityDef tf_weapon_ac
|
||||||
|
{
|
||||||
|
"editor_color" ".3 .3 1"
|
||||||
|
"editor_mins" "-16 -16 -16"
|
||||||
|
"editor_maxs" "16 16 16"
|
||||||
|
"editor_usage" "9mm Handgun"
|
||||||
|
"editor_rotatable" "1"
|
||||||
|
|
||||||
|
"spawnclass" "HLWeapon"
|
||||||
|
"model" "models/w_tfac.mdl"
|
||||||
|
"model_view" "models/v_tfac.mdl"
|
||||||
|
"snd_acquire" "weapon.pickup"
|
||||||
|
"snd_respawn" "item.respawn"
|
||||||
|
|
||||||
|
// weapon specific
|
||||||
|
"def_fireInfo" "fireInfo_glock"
|
||||||
|
"def_altFireInfo" "fireInfo_altGlock"
|
||||||
|
"inv_name" "9mm Handgun"
|
||||||
|
"clipSize" "17"
|
||||||
|
"ammoType" "ammo_9mm"
|
||||||
|
"ammoRequired" "1"
|
||||||
|
"ammoPerShot" "1"
|
||||||
|
"punchAngle" "-2 0 0"
|
||||||
|
|
||||||
|
"actFire" "3"
|
||||||
|
"actAltFire" "3"
|
||||||
|
"actFireLast" "4"
|
||||||
|
"actAltFireLast" "4"
|
||||||
|
"actHolster" "8"
|
||||||
|
"actReload" "6"
|
||||||
|
"actReloadEmpty" "5"
|
||||||
|
"actDraw" "7"
|
||||||
|
"actIdle" "0,1,2"
|
||||||
|
|
||||||
|
"snd_fire" "weapon_glock.fire"
|
||||||
|
"snd_altfire" "weapon_glock.fire"
|
||||||
|
"snd_empty" "weapon_glock.empty"
|
||||||
|
|
||||||
|
// HLWeapon specific
|
||||||
|
"hudSlot" "1"
|
||||||
|
"hudSlotPos" "0"
|
||||||
|
"weight" "10"
|
||||||
|
}
|
43
zpak001.pk3dir/def/weapons/autorifle.def
Normal file
43
zpak001.pk3dir/def/weapons/autorifle.def
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
entityDef tf_weapon_autorifle
|
||||||
|
{
|
||||||
|
"editor_color" ".3 .3 1"
|
||||||
|
"editor_mins" "-16 -16 -16"
|
||||||
|
"editor_maxs" "16 16 16"
|
||||||
|
"editor_usage" "9mm Handgun"
|
||||||
|
"editor_rotatable" "1"
|
||||||
|
|
||||||
|
"spawnclass" "HLWeapon"
|
||||||
|
"model" "models/w_9mmhandgun.mdl"
|
||||||
|
"model_view" "models/v_tfc_sniper.mdl"
|
||||||
|
"snd_acquire" "weapon.pickup"
|
||||||
|
"snd_respawn" "item.respawn"
|
||||||
|
|
||||||
|
// weapon specific
|
||||||
|
"def_fireInfo" "fireInfo_glock"
|
||||||
|
"def_altFireInfo" "fireInfo_altGlock"
|
||||||
|
"inv_name" "9mm Handgun"
|
||||||
|
"clipSize" "17"
|
||||||
|
"ammoType" "ammo_9mm"
|
||||||
|
"ammoRequired" "1"
|
||||||
|
"ammoPerShot" "1"
|
||||||
|
"punchAngle" "-2 0 0"
|
||||||
|
|
||||||
|
"actFire" "3"
|
||||||
|
"actAltFire" "3"
|
||||||
|
"actFireLast" "4"
|
||||||
|
"actAltFireLast" "4"
|
||||||
|
"actHolster" "8"
|
||||||
|
"actReload" "6"
|
||||||
|
"actReloadEmpty" "5"
|
||||||
|
"actDraw" "7"
|
||||||
|
"actIdle" "0,1,2"
|
||||||
|
|
||||||
|
"snd_fire" "weapon_glock.fire"
|
||||||
|
"snd_altfire" "weapon_glock.fire"
|
||||||
|
"snd_empty" "weapon_glock.empty"
|
||||||
|
|
||||||
|
// HLWeapon specific
|
||||||
|
"hudSlot" "1"
|
||||||
|
"hudSlotPos" "0"
|
||||||
|
"weight" "10"
|
||||||
|
}
|
43
zpak001.pk3dir/def/weapons/axe.def
Normal file
43
zpak001.pk3dir/def/weapons/axe.def
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
entityDef tf_weapon_axe
|
||||||
|
{
|
||||||
|
"editor_color" ".3 .3 1"
|
||||||
|
"editor_mins" "-16 -16 -16"
|
||||||
|
"editor_maxs" "16 16 16"
|
||||||
|
"editor_usage" "9mm Handgun"
|
||||||
|
"editor_rotatable" "1"
|
||||||
|
|
||||||
|
"spawnclass" "HLWeapon"
|
||||||
|
"model" "models/w_9mmhandgun.mdl"
|
||||||
|
"model_view" "models/v_tfc_crowbar.mdl"
|
||||||
|
"snd_acquire" "weapon.pickup"
|
||||||
|
"snd_respawn" "item.respawn"
|
||||||
|
|
||||||
|
// weapon specific
|
||||||
|
"def_fireInfo" "fireInfo_glock"
|
||||||
|
"def_altFireInfo" "fireInfo_altGlock"
|
||||||
|
"inv_name" "9mm Handgun"
|
||||||
|
"clipSize" "17"
|
||||||
|
"ammoType" "ammo_9mm"
|
||||||
|
"ammoRequired" "1"
|
||||||
|
"ammoPerShot" "1"
|
||||||
|
"punchAngle" "-2 0 0"
|
||||||
|
|
||||||
|
"actFire" "3"
|
||||||
|
"actAltFire" "3"
|
||||||
|
"actFireLast" "4"
|
||||||
|
"actAltFireLast" "4"
|
||||||
|
"actHolster" "8"
|
||||||
|
"actReload" "6"
|
||||||
|
"actReloadEmpty" "5"
|
||||||
|
"actDraw" "7"
|
||||||
|
"actIdle" "0,1,2"
|
||||||
|
|
||||||
|
"snd_fire" "weapon_glock.fire"
|
||||||
|
"snd_altfire" "weapon_glock.fire"
|
||||||
|
"snd_empty" "weapon_glock.empty"
|
||||||
|
|
||||||
|
// HLWeapon specific
|
||||||
|
"hudSlot" "1"
|
||||||
|
"hudSlotPos" "0"
|
||||||
|
"weight" "10"
|
||||||
|
}
|
43
zpak001.pk3dir/def/weapons/flamethrower.def
Normal file
43
zpak001.pk3dir/def/weapons/flamethrower.def
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
entityDef tf_weapon_flamethrower
|
||||||
|
{
|
||||||
|
"editor_color" ".3 .3 1"
|
||||||
|
"editor_mins" "-16 -16 -16"
|
||||||
|
"editor_maxs" "16 16 16"
|
||||||
|
"editor_usage" "9mm Handgun"
|
||||||
|
"editor_rotatable" "1"
|
||||||
|
|
||||||
|
"spawnclass" "HLWeapon"
|
||||||
|
"model" "models/w_9mmhandgun.mdl"
|
||||||
|
"model_view" "models/v_flame.mdl"
|
||||||
|
"snd_acquire" "weapon.pickup"
|
||||||
|
"snd_respawn" "item.respawn"
|
||||||
|
|
||||||
|
// weapon specific
|
||||||
|
"def_fireInfo" "fireInfo_glock"
|
||||||
|
"def_altFireInfo" "fireInfo_altGlock"
|
||||||
|
"inv_name" "9mm Handgun"
|
||||||
|
"clipSize" "17"
|
||||||
|
"ammoType" "ammo_9mm"
|
||||||
|
"ammoRequired" "1"
|
||||||
|
"ammoPerShot" "1"
|
||||||
|
"punchAngle" "-2 0 0"
|
||||||
|
|
||||||
|
"actFire" "3"
|
||||||
|
"actAltFire" "3"
|
||||||
|
"actFireLast" "4"
|
||||||
|
"actAltFireLast" "4"
|
||||||
|
"actHolster" "8"
|
||||||
|
"actReload" "6"
|
||||||
|
"actReloadEmpty" "5"
|
||||||
|
"actDraw" "7"
|
||||||
|
"actIdle" "0,1,2"
|
||||||
|
|
||||||
|
"snd_fire" "weapon_glock.fire"
|
||||||
|
"snd_altfire" "weapon_glock.fire"
|
||||||
|
"snd_empty" "weapon_glock.empty"
|
||||||
|
|
||||||
|
// HLWeapon specific
|
||||||
|
"hudSlot" "1"
|
||||||
|
"hudSlotPos" "0"
|
||||||
|
"weight" "10"
|
||||||
|
}
|
43
zpak001.pk3dir/def/weapons/gl.def
Normal file
43
zpak001.pk3dir/def/weapons/gl.def
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
entityDef tf_weapon_gl
|
||||||
|
{
|
||||||
|
"editor_color" ".3 .3 1"
|
||||||
|
"editor_mins" "-16 -16 -16"
|
||||||
|
"editor_maxs" "16 16 16"
|
||||||
|
"editor_usage" "9mm Handgun"
|
||||||
|
"editor_rotatable" "1"
|
||||||
|
|
||||||
|
"spawnclass" "HLWeapon"
|
||||||
|
"model" "models/w_9mmhandgun.mdl"
|
||||||
|
"model_view" "models/v_tfgl.mdl"
|
||||||
|
"snd_acquire" "weapon.pickup"
|
||||||
|
"snd_respawn" "item.respawn"
|
||||||
|
|
||||||
|
// weapon specific
|
||||||
|
"def_fireInfo" "fireInfo_glock"
|
||||||
|
"def_altFireInfo" "fireInfo_altGlock"
|
||||||
|
"inv_name" "9mm Handgun"
|
||||||
|
"clipSize" "17"
|
||||||
|
"ammoType" "ammo_9mm"
|
||||||
|
"ammoRequired" "1"
|
||||||
|
"ammoPerShot" "1"
|
||||||
|
"punchAngle" "-2 0 0"
|
||||||
|
|
||||||
|
"actFire" "3"
|
||||||
|
"actAltFire" "3"
|
||||||
|
"actFireLast" "4"
|
||||||
|
"actAltFireLast" "4"
|
||||||
|
"actHolster" "8"
|
||||||
|
"actReload" "6"
|
||||||
|
"actReloadEmpty" "5"
|
||||||
|
"actDraw" "7"
|
||||||
|
"actIdle" "0,1,2"
|
||||||
|
|
||||||
|
"snd_fire" "weapon_glock.fire"
|
||||||
|
"snd_altfire" "weapon_glock.fire"
|
||||||
|
"snd_empty" "weapon_glock.empty"
|
||||||
|
|
||||||
|
// HLWeapon specific
|
||||||
|
"hudSlot" "1"
|
||||||
|
"hudSlotPos" "0"
|
||||||
|
"weight" "10"
|
||||||
|
}
|
43
zpak001.pk3dir/def/weapons/ic.def
Normal file
43
zpak001.pk3dir/def/weapons/ic.def
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
entityDef tf_weapon_ic
|
||||||
|
{
|
||||||
|
"editor_color" ".3 .3 1"
|
||||||
|
"editor_mins" "-16 -16 -16"
|
||||||
|
"editor_maxs" "16 16 16"
|
||||||
|
"editor_usage" "9mm Handgun"
|
||||||
|
"editor_rotatable" "1"
|
||||||
|
|
||||||
|
"spawnclass" "HLWeapon"
|
||||||
|
"model" "models/w_9mmhandgun.mdl"
|
||||||
|
"model_view" "models/v_tfc_rpg.mdl"
|
||||||
|
"snd_acquire" "weapon.pickup"
|
||||||
|
"snd_respawn" "item.respawn"
|
||||||
|
|
||||||
|
// weapon specific
|
||||||
|
"def_fireInfo" "fireInfo_glock"
|
||||||
|
"def_altFireInfo" "fireInfo_altGlock"
|
||||||
|
"inv_name" "9mm Handgun"
|
||||||
|
"clipSize" "17"
|
||||||
|
"ammoType" "ammo_9mm"
|
||||||
|
"ammoRequired" "1"
|
||||||
|
"ammoPerShot" "1"
|
||||||
|
"punchAngle" "-2 0 0"
|
||||||
|
|
||||||
|
"actFire" "3"
|
||||||
|
"actAltFire" "3"
|
||||||
|
"actFireLast" "4"
|
||||||
|
"actAltFireLast" "4"
|
||||||
|
"actHolster" "8"
|
||||||
|
"actReload" "6"
|
||||||
|
"actReloadEmpty" "5"
|
||||||
|
"actDraw" "7"
|
||||||
|
"actIdle" "0,1,2"
|
||||||
|
|
||||||
|
"snd_fire" "weapon_glock.fire"
|
||||||
|
"snd_altfire" "weapon_glock.fire"
|
||||||
|
"snd_empty" "weapon_glock.empty"
|
||||||
|
|
||||||
|
// HLWeapon specific
|
||||||
|
"hudSlot" "1"
|
||||||
|
"hudSlotPos" "0"
|
||||||
|
"weight" "10"
|
||||||
|
}
|
43
zpak001.pk3dir/def/weapons/knife.def
Normal file
43
zpak001.pk3dir/def/weapons/knife.def
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
entityDef tf_weapon_knife
|
||||||
|
{
|
||||||
|
"editor_color" ".3 .3 1"
|
||||||
|
"editor_mins" "-16 -16 -16"
|
||||||
|
"editor_maxs" "16 16 16"
|
||||||
|
"editor_usage" "9mm Handgun"
|
||||||
|
"editor_rotatable" "1"
|
||||||
|
|
||||||
|
"spawnclass" "HLWeapon"
|
||||||
|
"model" "models/w_9mmhandgun.mdl"
|
||||||
|
"model_view" "models/v_tfc_knife.mdl"
|
||||||
|
"snd_acquire" "weapon.pickup"
|
||||||
|
"snd_respawn" "item.respawn"
|
||||||
|
|
||||||
|
// weapon specific
|
||||||
|
"def_fireInfo" "fireInfo_glock"
|
||||||
|
"def_altFireInfo" "fireInfo_altGlock"
|
||||||
|
"inv_name" "9mm Handgun"
|
||||||
|
"clipSize" "17"
|
||||||
|
"ammoType" "ammo_9mm"
|
||||||
|
"ammoRequired" "1"
|
||||||
|
"ammoPerShot" "1"
|
||||||
|
"punchAngle" "-2 0 0"
|
||||||
|
|
||||||
|
"actFire" "3"
|
||||||
|
"actAltFire" "3"
|
||||||
|
"actFireLast" "4"
|
||||||
|
"actAltFireLast" "4"
|
||||||
|
"actHolster" "8"
|
||||||
|
"actReload" "6"
|
||||||
|
"actReloadEmpty" "5"
|
||||||
|
"actDraw" "7"
|
||||||
|
"actIdle" "0,1,2"
|
||||||
|
|
||||||
|
"snd_fire" "weapon_glock.fire"
|
||||||
|
"snd_altfire" "weapon_glock.fire"
|
||||||
|
"snd_empty" "weapon_glock.empty"
|
||||||
|
|
||||||
|
// HLWeapon specific
|
||||||
|
"hudSlot" "1"
|
||||||
|
"hudSlotPos" "0"
|
||||||
|
"weight" "10"
|
||||||
|
}
|
43
zpak001.pk3dir/def/weapons/medikit.def
Normal file
43
zpak001.pk3dir/def/weapons/medikit.def
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
entityDef tf_weapon_medikit
|
||||||
|
{
|
||||||
|
"editor_color" ".3 .3 1"
|
||||||
|
"editor_mins" "-16 -16 -16"
|
||||||
|
"editor_maxs" "16 16 16"
|
||||||
|
"editor_usage" "9mm Handgun"
|
||||||
|
"editor_rotatable" "1"
|
||||||
|
|
||||||
|
"spawnclass" "HLWeapon"
|
||||||
|
"model" "models/w_9mmhandgun.mdl"
|
||||||
|
"model_view" "models/v_tfc_medkit.mdl"
|
||||||
|
"snd_acquire" "weapon.pickup"
|
||||||
|
"snd_respawn" "item.respawn"
|
||||||
|
|
||||||
|
// weapon specific
|
||||||
|
"def_fireInfo" "fireInfo_glock"
|
||||||
|
"def_altFireInfo" "fireInfo_altGlock"
|
||||||
|
"inv_name" "9mm Handgun"
|
||||||
|
"clipSize" "17"
|
||||||
|
"ammoType" "ammo_9mm"
|
||||||
|
"ammoRequired" "1"
|
||||||
|
"ammoPerShot" "1"
|
||||||
|
"punchAngle" "-2 0 0"
|
||||||
|
|
||||||
|
"actFire" "3"
|
||||||
|
"actAltFire" "3"
|
||||||
|
"actFireLast" "4"
|
||||||
|
"actAltFireLast" "4"
|
||||||
|
"actHolster" "8"
|
||||||
|
"actReload" "6"
|
||||||
|
"actReloadEmpty" "5"
|
||||||
|
"actDraw" "7"
|
||||||
|
"actIdle" "0,1,2"
|
||||||
|
|
||||||
|
"snd_fire" "weapon_glock.fire"
|
||||||
|
"snd_altfire" "weapon_glock.fire"
|
||||||
|
"snd_empty" "weapon_glock.empty"
|
||||||
|
|
||||||
|
// HLWeapon specific
|
||||||
|
"hudSlot" "1"
|
||||||
|
"hudSlotPos" "0"
|
||||||
|
"weight" "10"
|
||||||
|
}
|
43
zpak001.pk3dir/def/weapons/ng.def
Normal file
43
zpak001.pk3dir/def/weapons/ng.def
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
entityDef tf_weapon_ng
|
||||||
|
{
|
||||||
|
"editor_color" ".3 .3 1"
|
||||||
|
"editor_mins" "-16 -16 -16"
|
||||||
|
"editor_maxs" "16 16 16"
|
||||||
|
"editor_usage" "9mm Handgun"
|
||||||
|
"editor_rotatable" "1"
|
||||||
|
|
||||||
|
"spawnclass" "HLWeapon"
|
||||||
|
"model" "models/w_9mmhandgun.mdl"
|
||||||
|
"model_view" "models/v_tfc_nailgun.mdl"
|
||||||
|
"snd_acquire" "weapon.pickup"
|
||||||
|
"snd_respawn" "item.respawn"
|
||||||
|
|
||||||
|
// weapon specific
|
||||||
|
"def_fireInfo" "fireInfo_glock"
|
||||||
|
"def_altFireInfo" "fireInfo_altGlock"
|
||||||
|
"inv_name" "9mm Handgun"
|
||||||
|
"clipSize" "17"
|
||||||
|
"ammoType" "ammo_9mm"
|
||||||
|
"ammoRequired" "1"
|
||||||
|
"ammoPerShot" "1"
|
||||||
|
"punchAngle" "-2 0 0"
|
||||||
|
|
||||||
|
"actFire" "3"
|
||||||
|
"actAltFire" "3"
|
||||||
|
"actFireLast" "4"
|
||||||
|
"actAltFireLast" "4"
|
||||||
|
"actHolster" "8"
|
||||||
|
"actReload" "6"
|
||||||
|
"actReloadEmpty" "5"
|
||||||
|
"actDraw" "7"
|
||||||
|
"actIdle" "0,1,2"
|
||||||
|
|
||||||
|
"snd_fire" "weapon_glock.fire"
|
||||||
|
"snd_altfire" "weapon_glock.fire"
|
||||||
|
"snd_empty" "weapon_glock.empty"
|
||||||
|
|
||||||
|
// HLWeapon specific
|
||||||
|
"hudSlot" "1"
|
||||||
|
"hudSlotPos" "0"
|
||||||
|
"weight" "10"
|
||||||
|
}
|
43
zpak001.pk3dir/def/weapons/pl.def
Normal file
43
zpak001.pk3dir/def/weapons/pl.def
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
entityDef tf_weapon_pl
|
||||||
|
{
|
||||||
|
"editor_color" ".3 .3 1"
|
||||||
|
"editor_mins" "-16 -16 -16"
|
||||||
|
"editor_maxs" "16 16 16"
|
||||||
|
"editor_usage" "9mm Handgun"
|
||||||
|
"editor_rotatable" "1"
|
||||||
|
|
||||||
|
"spawnclass" "HLWeapon"
|
||||||
|
"model" "models/w_9mmhandgun.mdl"
|
||||||
|
"model_view" "models/v_tfgl.mdl"
|
||||||
|
"snd_acquire" "weapon.pickup"
|
||||||
|
"snd_respawn" "item.respawn"
|
||||||
|
|
||||||
|
// weapon specific
|
||||||
|
"def_fireInfo" "fireInfo_glock"
|
||||||
|
"def_altFireInfo" "fireInfo_altGlock"
|
||||||
|
"inv_name" "9mm Handgun"
|
||||||
|
"clipSize" "17"
|
||||||
|
"ammoType" "ammo_9mm"
|
||||||
|
"ammoRequired" "1"
|
||||||
|
"ammoPerShot" "1"
|
||||||
|
"punchAngle" "-2 0 0"
|
||||||
|
|
||||||
|
"actFire" "3"
|
||||||
|
"actAltFire" "3"
|
||||||
|
"actFireLast" "4"
|
||||||
|
"actAltFireLast" "4"
|
||||||
|
"actHolster" "8"
|
||||||
|
"actReload" "6"
|
||||||
|
"actReloadEmpty" "5"
|
||||||
|
"actDraw" "7"
|
||||||
|
"actIdle" "0,1,2"
|
||||||
|
|
||||||
|
"snd_fire" "weapon_glock.fire"
|
||||||
|
"snd_altfire" "weapon_glock.fire"
|
||||||
|
"snd_empty" "weapon_glock.empty"
|
||||||
|
|
||||||
|
// HLWeapon specific
|
||||||
|
"hudSlot" "1"
|
||||||
|
"hudSlotPos" "0"
|
||||||
|
"weight" "10"
|
||||||
|
}
|
43
zpak001.pk3dir/def/weapons/railgun.def
Normal file
43
zpak001.pk3dir/def/weapons/railgun.def
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
entityDef tf_weapon_railgun
|
||||||
|
{
|
||||||
|
"editor_color" ".3 .3 1"
|
||||||
|
"editor_mins" "-16 -16 -16"
|
||||||
|
"editor_maxs" "16 16 16"
|
||||||
|
"editor_usage" "9mm Handgun"
|
||||||
|
"editor_rotatable" "1"
|
||||||
|
|
||||||
|
"spawnclass" "HLWeapon"
|
||||||
|
"model" "models/w_9mmhandgun.mdl"
|
||||||
|
"model_view" "models/v_tfc_railgun.mdl"
|
||||||
|
"snd_acquire" "weapon.pickup"
|
||||||
|
"snd_respawn" "item.respawn"
|
||||||
|
|
||||||
|
// weapon specific
|
||||||
|
"def_fireInfo" "fireInfo_glock"
|
||||||
|
"def_altFireInfo" "fireInfo_altGlock"
|
||||||
|
"inv_name" "9mm Handgun"
|
||||||
|
"clipSize" "17"
|
||||||
|
"ammoType" "ammo_9mm"
|
||||||
|
"ammoRequired" "1"
|
||||||
|
"ammoPerShot" "1"
|
||||||
|
"punchAngle" "-2 0 0"
|
||||||
|
|
||||||
|
"actFire" "3"
|
||||||
|
"actAltFire" "3"
|
||||||
|
"actFireLast" "4"
|
||||||
|
"actAltFireLast" "4"
|
||||||
|
"actHolster" "8"
|
||||||
|
"actReload" "6"
|
||||||
|
"actReloadEmpty" "5"
|
||||||
|
"actDraw" "7"
|
||||||
|
"actIdle" "0,1,2"
|
||||||
|
|
||||||
|
"snd_fire" "weapon_glock.fire"
|
||||||
|
"snd_altfire" "weapon_glock.fire"
|
||||||
|
"snd_empty" "weapon_glock.empty"
|
||||||
|
|
||||||
|
// HLWeapon specific
|
||||||
|
"hudSlot" "1"
|
||||||
|
"hudSlotPos" "0"
|
||||||
|
"weight" "10"
|
||||||
|
}
|
43
zpak001.pk3dir/def/weapons/rpg.def
Normal file
43
zpak001.pk3dir/def/weapons/rpg.def
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
entityDef tf_weapon_rpg
|
||||||
|
{
|
||||||
|
"editor_color" ".3 .3 1"
|
||||||
|
"editor_mins" "-16 -16 -16"
|
||||||
|
"editor_maxs" "16 16 16"
|
||||||
|
"editor_usage" "9mm Handgun"
|
||||||
|
"editor_rotatable" "1"
|
||||||
|
|
||||||
|
"spawnclass" "HLWeapon"
|
||||||
|
"model" "models/w_9mmhandgun.mdl"
|
||||||
|
"model_view" "models/v_tfc_rpg.mdl"
|
||||||
|
"snd_acquire" "weapon.pickup"
|
||||||
|
"snd_respawn" "item.respawn"
|
||||||
|
|
||||||
|
// weapon specific
|
||||||
|
"def_fireInfo" "fireInfo_glock"
|
||||||
|
"def_altFireInfo" "fireInfo_altGlock"
|
||||||
|
"inv_name" "9mm Handgun"
|
||||||
|
"clipSize" "17"
|
||||||
|
"ammoType" "ammo_9mm"
|
||||||
|
"ammoRequired" "1"
|
||||||
|
"ammoPerShot" "1"
|
||||||
|
"punchAngle" "-2 0 0"
|
||||||
|
|
||||||
|
"actFire" "3"
|
||||||
|
"actAltFire" "3"
|
||||||
|
"actFireLast" "4"
|
||||||
|
"actAltFireLast" "4"
|
||||||
|
"actHolster" "8"
|
||||||
|
"actReload" "6"
|
||||||
|
"actReloadEmpty" "5"
|
||||||
|
"actDraw" "7"
|
||||||
|
"actIdle" "0,1,2"
|
||||||
|
|
||||||
|
"snd_fire" "weapon_glock.fire"
|
||||||
|
"snd_altfire" "weapon_glock.fire"
|
||||||
|
"snd_empty" "weapon_glock.empty"
|
||||||
|
|
||||||
|
// HLWeapon specific
|
||||||
|
"hudSlot" "1"
|
||||||
|
"hudSlotPos" "0"
|
||||||
|
"weight" "10"
|
||||||
|
}
|
43
zpak001.pk3dir/def/weapons/shotgun.def
Normal file
43
zpak001.pk3dir/def/weapons/shotgun.def
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
entityDef tf_weapon_shotgun
|
||||||
|
{
|
||||||
|
"editor_color" ".3 .3 1"
|
||||||
|
"editor_mins" "-16 -16 -16"
|
||||||
|
"editor_maxs" "16 16 16"
|
||||||
|
"editor_usage" "9mm Handgun"
|
||||||
|
"editor_rotatable" "1"
|
||||||
|
|
||||||
|
"spawnclass" "HLWeapon"
|
||||||
|
"model" "models/w_9mmhandgun.mdl"
|
||||||
|
"model_view" "models/v_tfc_12gauge.mdl"
|
||||||
|
"snd_acquire" "weapon.pickup"
|
||||||
|
"snd_respawn" "item.respawn"
|
||||||
|
|
||||||
|
// weapon specific
|
||||||
|
"def_fireInfo" "fireInfo_glock"
|
||||||
|
"def_altFireInfo" "fireInfo_altGlock"
|
||||||
|
"inv_name" "9mm Handgun"
|
||||||
|
"clipSize" "17"
|
||||||
|
"ammoType" "ammo_9mm"
|
||||||
|
"ammoRequired" "1"
|
||||||
|
"ammoPerShot" "1"
|
||||||
|
"punchAngle" "-2 0 0"
|
||||||
|
|
||||||
|
"actFire" "3"
|
||||||
|
"actAltFire" "3"
|
||||||
|
"actFireLast" "4"
|
||||||
|
"actAltFireLast" "4"
|
||||||
|
"actHolster" "8"
|
||||||
|
"actReload" "6"
|
||||||
|
"actReloadEmpty" "5"
|
||||||
|
"actDraw" "7"
|
||||||
|
"actIdle" "0,1,2"
|
||||||
|
|
||||||
|
"snd_fire" "weapon_glock.fire"
|
||||||
|
"snd_altfire" "weapon_glock.fire"
|
||||||
|
"snd_empty" "weapon_glock.empty"
|
||||||
|
|
||||||
|
// HLWeapon specific
|
||||||
|
"hudSlot" "1"
|
||||||
|
"hudSlotPos" "0"
|
||||||
|
"weight" "10"
|
||||||
|
}
|
43
zpak001.pk3dir/def/weapons/sniperrifle.def
Normal file
43
zpak001.pk3dir/def/weapons/sniperrifle.def
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
entityDef tf_weapon_sniperrifle
|
||||||
|
{
|
||||||
|
"editor_color" ".3 .3 1"
|
||||||
|
"editor_mins" "-16 -16 -16"
|
||||||
|
"editor_maxs" "16 16 16"
|
||||||
|
"editor_usage" "9mm Handgun"
|
||||||
|
"editor_rotatable" "1"
|
||||||
|
|
||||||
|
"spawnclass" "HLWeapon"
|
||||||
|
"model" "models/w_9mmhandgun.mdl"
|
||||||
|
"model_view" "models/v_tfc_sniper.mdl"
|
||||||
|
"snd_acquire" "weapon.pickup"
|
||||||
|
"snd_respawn" "item.respawn"
|
||||||
|
|
||||||
|
// weapon specific
|
||||||
|
"def_fireInfo" "fireInfo_glock"
|
||||||
|
"def_altFireInfo" "fireInfo_altGlock"
|
||||||
|
"inv_name" "9mm Handgun"
|
||||||
|
"clipSize" "17"
|
||||||
|
"ammoType" "ammo_9mm"
|
||||||
|
"ammoRequired" "1"
|
||||||
|
"ammoPerShot" "1"
|
||||||
|
"punchAngle" "-2 0 0"
|
||||||
|
|
||||||
|
"actFire" "3"
|
||||||
|
"actAltFire" "3"
|
||||||
|
"actFireLast" "4"
|
||||||
|
"actAltFireLast" "4"
|
||||||
|
"actHolster" "8"
|
||||||
|
"actReload" "6"
|
||||||
|
"actReloadEmpty" "5"
|
||||||
|
"actDraw" "7"
|
||||||
|
"actIdle" "0,1,2"
|
||||||
|
|
||||||
|
"snd_fire" "weapon_glock.fire"
|
||||||
|
"snd_altfire" "weapon_glock.fire"
|
||||||
|
"snd_empty" "weapon_glock.empty"
|
||||||
|
|
||||||
|
// HLWeapon specific
|
||||||
|
"hudSlot" "1"
|
||||||
|
"hudSlotPos" "0"
|
||||||
|
"weight" "10"
|
||||||
|
}
|
43
zpak001.pk3dir/def/weapons/spanner.def
Normal file
43
zpak001.pk3dir/def/weapons/spanner.def
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
entityDef tf_weapon_spanner
|
||||||
|
{
|
||||||
|
"editor_color" ".3 .3 1"
|
||||||
|
"editor_mins" "-16 -16 -16"
|
||||||
|
"editor_maxs" "16 16 16"
|
||||||
|
"editor_usage" "9mm Handgun"
|
||||||
|
"editor_rotatable" "1"
|
||||||
|
|
||||||
|
"spawnclass" "HLWeapon"
|
||||||
|
"model" "models/w_9mmhandgun.mdl"
|
||||||
|
"model_view" "models/v_tfc_spanner.mdl"
|
||||||
|
"snd_acquire" "weapon.pickup"
|
||||||
|
"snd_respawn" "item.respawn"
|
||||||
|
|
||||||
|
// weapon specific
|
||||||
|
"def_fireInfo" "fireInfo_glock"
|
||||||
|
"def_altFireInfo" "fireInfo_altGlock"
|
||||||
|
"inv_name" "9mm Handgun"
|
||||||
|
"clipSize" "17"
|
||||||
|
"ammoType" "ammo_9mm"
|
||||||
|
"ammoRequired" "1"
|
||||||
|
"ammoPerShot" "1"
|
||||||
|
"punchAngle" "-2 0 0"
|
||||||
|
|
||||||
|
"actFire" "3"
|
||||||
|
"actAltFire" "3"
|
||||||
|
"actFireLast" "4"
|
||||||
|
"actAltFireLast" "4"
|
||||||
|
"actHolster" "8"
|
||||||
|
"actReload" "6"
|
||||||
|
"actReloadEmpty" "5"
|
||||||
|
"actDraw" "7"
|
||||||
|
"actIdle" "0,1,2"
|
||||||
|
|
||||||
|
"snd_fire" "weapon_glock.fire"
|
||||||
|
"snd_altfire" "weapon_glock.fire"
|
||||||
|
"snd_empty" "weapon_glock.empty"
|
||||||
|
|
||||||
|
// HLWeapon specific
|
||||||
|
"hudSlot" "1"
|
||||||
|
"hudSlotPos" "0"
|
||||||
|
"weight" "10"
|
||||||
|
}
|
43
zpak001.pk3dir/def/weapons/superng.def
Normal file
43
zpak001.pk3dir/def/weapons/superng.def
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
entityDef tf_weapon_superng
|
||||||
|
{
|
||||||
|
"editor_color" ".3 .3 1"
|
||||||
|
"editor_mins" "-16 -16 -16"
|
||||||
|
"editor_maxs" "16 16 16"
|
||||||
|
"editor_usage" "9mm Handgun"
|
||||||
|
"editor_rotatable" "1"
|
||||||
|
|
||||||
|
"spawnclass" "HLWeapon"
|
||||||
|
"model" "models/w_9mmhandgun.mdl"
|
||||||
|
"model_view" "models/v_tfc_supernailgun.mdl"
|
||||||
|
"snd_acquire" "weapon.pickup"
|
||||||
|
"snd_respawn" "item.respawn"
|
||||||
|
|
||||||
|
// weapon specific
|
||||||
|
"def_fireInfo" "fireInfo_glock"
|
||||||
|
"def_altFireInfo" "fireInfo_altGlock"
|
||||||
|
"inv_name" "9mm Handgun"
|
||||||
|
"clipSize" "17"
|
||||||
|
"ammoType" "ammo_9mm"
|
||||||
|
"ammoRequired" "1"
|
||||||
|
"ammoPerShot" "1"
|
||||||
|
"punchAngle" "-2 0 0"
|
||||||
|
|
||||||
|
"actFire" "3"
|
||||||
|
"actAltFire" "3"
|
||||||
|
"actFireLast" "4"
|
||||||
|
"actAltFireLast" "4"
|
||||||
|
"actHolster" "8"
|
||||||
|
"actReload" "6"
|
||||||
|
"actReloadEmpty" "5"
|
||||||
|
"actDraw" "7"
|
||||||
|
"actIdle" "0,1,2"
|
||||||
|
|
||||||
|
"snd_fire" "weapon_glock.fire"
|
||||||
|
"snd_altfire" "weapon_glock.fire"
|
||||||
|
"snd_empty" "weapon_glock.empty"
|
||||||
|
|
||||||
|
// HLWeapon specific
|
||||||
|
"hudSlot" "1"
|
||||||
|
"hudSlotPos" "0"
|
||||||
|
"weight" "10"
|
||||||
|
}
|
43
zpak001.pk3dir/def/weapons/supershotgun.def
Normal file
43
zpak001.pk3dir/def/weapons/supershotgun.def
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
entityDef tf_weapon_supershotgun
|
||||||
|
{
|
||||||
|
"editor_color" ".3 .3 1"
|
||||||
|
"editor_mins" "-16 -16 -16"
|
||||||
|
"editor_maxs" "16 16 16"
|
||||||
|
"editor_usage" "9mm Handgun"
|
||||||
|
"editor_rotatable" "1"
|
||||||
|
|
||||||
|
"spawnclass" "HLWeapon"
|
||||||
|
"model" "models/w_9mmhandgun.mdl"
|
||||||
|
"model_view" "models/v_tfc_shotgun.mdl"
|
||||||
|
"snd_acquire" "weapon.pickup"
|
||||||
|
"snd_respawn" "item.respawn"
|
||||||
|
|
||||||
|
// weapon specific
|
||||||
|
"def_fireInfo" "fireInfo_glock"
|
||||||
|
"def_altFireInfo" "fireInfo_altGlock"
|
||||||
|
"inv_name" "9mm Handgun"
|
||||||
|
"clipSize" "17"
|
||||||
|
"ammoType" "ammo_9mm"
|
||||||
|
"ammoRequired" "1"
|
||||||
|
"ammoPerShot" "1"
|
||||||
|
"punchAngle" "-2 0 0"
|
||||||
|
|
||||||
|
"actFire" "3"
|
||||||
|
"actAltFire" "3"
|
||||||
|
"actFireLast" "4"
|
||||||
|
"actAltFireLast" "4"
|
||||||
|
"actHolster" "8"
|
||||||
|
"actReload" "6"
|
||||||
|
"actReloadEmpty" "5"
|
||||||
|
"actDraw" "7"
|
||||||
|
"actIdle" "0,1,2"
|
||||||
|
|
||||||
|
"snd_fire" "weapon_glock.fire"
|
||||||
|
"snd_altfire" "weapon_glock.fire"
|
||||||
|
"snd_empty" "weapon_glock.empty"
|
||||||
|
|
||||||
|
// HLWeapon specific
|
||||||
|
"hudSlot" "1"
|
||||||
|
"hudSlotPos" "0"
|
||||||
|
"weight" "10"
|
||||||
|
}
|
43
zpak001.pk3dir/def/weapons/tranq.def
Normal file
43
zpak001.pk3dir/def/weapons/tranq.def
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
entityDef tf_weapon_tranq
|
||||||
|
{
|
||||||
|
"editor_color" ".3 .3 1"
|
||||||
|
"editor_mins" "-16 -16 -16"
|
||||||
|
"editor_maxs" "16 16 16"
|
||||||
|
"editor_usage" "9mm Handgun"
|
||||||
|
"editor_rotatable" "1"
|
||||||
|
|
||||||
|
"spawnclass" "HLWeapon"
|
||||||
|
"model" "models/w_9mmhandgun.mdl"
|
||||||
|
"model_view" "models/v_tfc_pistol.mdl"
|
||||||
|
"snd_acquire" "weapon.pickup"
|
||||||
|
"snd_respawn" "item.respawn"
|
||||||
|
|
||||||
|
// weapon specific
|
||||||
|
"def_fireInfo" "fireInfo_glock"
|
||||||
|
"def_altFireInfo" "fireInfo_altGlock"
|
||||||
|
"inv_name" "9mm Handgun"
|
||||||
|
"clipSize" "17"
|
||||||
|
"ammoType" "ammo_9mm"
|
||||||
|
"ammoRequired" "1"
|
||||||
|
"ammoPerShot" "1"
|
||||||
|
"punchAngle" "-2 0 0"
|
||||||
|
|
||||||
|
"actFire" "3"
|
||||||
|
"actAltFire" "3"
|
||||||
|
"actFireLast" "4"
|
||||||
|
"actAltFireLast" "4"
|
||||||
|
"actHolster" "8"
|
||||||
|
"actReload" "6"
|
||||||
|
"actReloadEmpty" "5"
|
||||||
|
"actDraw" "7"
|
||||||
|
"actIdle" "0,1,2"
|
||||||
|
|
||||||
|
"snd_fire" "weapon_glock.fire"
|
||||||
|
"snd_altfire" "weapon_glock.fire"
|
||||||
|
"snd_empty" "weapon_glock.empty"
|
||||||
|
|
||||||
|
// HLWeapon specific
|
||||||
|
"hudSlot" "1"
|
||||||
|
"hudSlotPos" "0"
|
||||||
|
"weight" "10"
|
||||||
|
}
|
Loading…
Reference in a new issue