mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-21 19:41:14 +00:00
most warnings fixed.
inventory system now works a bit better. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1761 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
1ca0df774e
commit
b973799d06
27 changed files with 282 additions and 329 deletions
|
@ -34,7 +34,7 @@ walkmove(angle, speed) primitive is all or nothing
|
|||
//
|
||||
// globals
|
||||
//
|
||||
float current_yaw;
|
||||
//float current_yaw;
|
||||
|
||||
//
|
||||
// when a monster becomes angry at a player, that monster will be used
|
||||
|
@ -471,8 +471,6 @@ The monster is walking it's beat
|
|||
*/
|
||||
void(float dist) ai_walk =
|
||||
{
|
||||
local vector mtemp;
|
||||
|
||||
movedist = dist;
|
||||
|
||||
if (self.classname == "monster_dragon")
|
||||
|
@ -674,10 +672,6 @@ The monster has an enemy it is trying to kill
|
|||
*/
|
||||
void(float dist) ai_run =
|
||||
{
|
||||
local vector delta;
|
||||
local float axis;
|
||||
local float direct, ang_rint, ang_floor, ang_ceil;
|
||||
|
||||
movedist = dist;
|
||||
// see if the enemy is dead
|
||||
if (self.enemy.health <= 0)
|
||||
|
|
|
@ -197,8 +197,6 @@ void() boss_death10 = [$death9, boss_death10]
|
|||
|
||||
void () LavaExplode =
|
||||
{
|
||||
local float r;
|
||||
|
||||
sound (self, CHAN_VOICE, "ambience/gunfire7.wav", 1, ATTN_NONE);
|
||||
self.origin = (self.origin + '0 0 16');
|
||||
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
|
||||
|
|
|
@ -85,8 +85,6 @@ When a button is touched, it moves some distance in the direction of it's angle,
|
|||
*/
|
||||
void() func_button =
|
||||
{
|
||||
local float gtemp, ftemp;
|
||||
|
||||
if (self.sounds == 0)
|
||||
{
|
||||
precache_sound ("buttons/airbut1.wav");
|
||||
|
|
|
@ -285,8 +285,6 @@ void() execute_changelevel =
|
|||
|
||||
void() changelevel_touch =
|
||||
{
|
||||
local entity pos;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
|
||||
|
@ -381,13 +379,11 @@ Returns the entity to spawn at
|
|||
*/
|
||||
entity() SelectSpawnPoint =
|
||||
{
|
||||
local entity spot, newspot, thing;
|
||||
local entity spot, thing;
|
||||
local float numspots, totalspots;
|
||||
local float rnum, pcount, xcount;
|
||||
local float rs, cooperate;
|
||||
local entity spots, ent2, xspot;
|
||||
local float pcount;
|
||||
local entity spots;
|
||||
local string ent1;
|
||||
local vector warp, xdir, org;
|
||||
|
||||
numspots = 0;
|
||||
totalspots = 0;
|
||||
|
@ -486,7 +482,6 @@ called each time a player enters a new level
|
|||
void() PutClientInServer =
|
||||
{
|
||||
local entity spot;
|
||||
local string s;
|
||||
|
||||
self.classname = "player";
|
||||
self.health = 100;
|
||||
|
@ -703,7 +698,6 @@ go to the next level for deathmatch
|
|||
void() NextLevel =
|
||||
{
|
||||
local entity o;
|
||||
local string newmap;
|
||||
|
||||
if (nextmap != "")
|
||||
return; // already done
|
||||
|
@ -838,7 +832,6 @@ void () LocateSpectatorTarget =
|
|||
|
||||
void() PlayerDeathThink =
|
||||
{
|
||||
local entity old_self;
|
||||
local float forward;
|
||||
|
||||
self.modelindex = modelindex_dead;
|
||||
|
@ -882,8 +875,6 @@ void() PlayerDeathThink =
|
|||
|
||||
void() PlayerJump =
|
||||
{
|
||||
local vector start, end;
|
||||
|
||||
if (self.flags & FL_WATERJUMP)
|
||||
return;
|
||||
|
||||
|
@ -1047,8 +1038,6 @@ void () SpeedControl =
|
|||
void() ArmorCheck =
|
||||
{
|
||||
local float type;
|
||||
local float bit;
|
||||
local float value;
|
||||
|
||||
local float aid;
|
||||
|
||||
|
@ -1135,8 +1124,6 @@ void () WeightControl =
|
|||
|
||||
void () PositionControl =
|
||||
{
|
||||
local string img;
|
||||
|
||||
if (self.position == 0)
|
||||
self.view_ofs = '0 0 22';
|
||||
if (self.position == 1)
|
||||
|
@ -1168,7 +1155,6 @@ Called every frame before physics are run
|
|||
*/
|
||||
void() PlayerPreThink =
|
||||
{
|
||||
local float mspeed, aspeed;
|
||||
local float r;
|
||||
|
||||
if (intermission_running)
|
||||
|
@ -1514,9 +1500,6 @@ Called every frame after physics are run
|
|||
*/
|
||||
void() PlayerPostThink =
|
||||
{
|
||||
local float mspeed, aspeed;
|
||||
local float r;
|
||||
|
||||
//dprint ("post think\n");
|
||||
if (self.view_ofs == '0 0 0')
|
||||
return; // intermission or finale
|
||||
|
@ -1624,7 +1607,6 @@ void(entity targ, entity attacker) ClientObituary =
|
|||
{
|
||||
local float rnum;
|
||||
local string deathstring, deathstring2;
|
||||
local string s;
|
||||
local string attackerteam, targteam;
|
||||
|
||||
rnum = random();
|
||||
|
@ -1980,7 +1962,7 @@ void(entity targ, entity attacker) ClientObituary =
|
|||
|
||||
void() Identify =
|
||||
{
|
||||
local string c1, c2, c3, c5, c6, c7;
|
||||
local string c1, c2, c3, c5;
|
||||
local float tmp;
|
||||
|
||||
makevectors (self.v_angle);
|
||||
|
|
|
@ -5,7 +5,6 @@ string(float n) argv = #442;
|
|||
float(string desc) itemtoslot =
|
||||
{
|
||||
local float slot;
|
||||
local float iid;
|
||||
slot = stof(desc);
|
||||
if (slot >= 1 && slot <= MAXSLOTS)
|
||||
return slot;
|
||||
|
@ -72,15 +71,6 @@ void(string arg1) Cmd_InvUse =
|
|||
return;
|
||||
}
|
||||
|
||||
if (iid == IID_CHEM_ADRENALINE ||
|
||||
iid == IID_CHEM_PSYCHO ||
|
||||
iid == IID_CHEM_BESERK)
|
||||
{
|
||||
if (UseBoostingChem(iid))
|
||||
DecreaseDestroySlot(slotno);
|
||||
return;
|
||||
}
|
||||
|
||||
if (iid == IID_BUILD_MRAMMO ||
|
||||
iid == IID_BUILD_SHIELDGEN ||
|
||||
iid == IID_BUILD_AUTODOC ||
|
||||
|
@ -161,6 +151,9 @@ void(string arg1, float iid, float num) Cmd_InvGive =
|
|||
if (num <= 0)
|
||||
num = 1;
|
||||
SetItemSlot(self, slotno, SlotVal(iid, num));
|
||||
|
||||
if (slotno == self.current_slot)
|
||||
W_SetCurrentAmmo();
|
||||
};
|
||||
|
||||
void(string line) SV_ParseClientCommand =
|
||||
|
|
|
@ -114,11 +114,9 @@ This should be the only function that ever reduces health.
|
|||
|
||||
void(entity targ, entity inflictor, entity attacker, float damage) T_Damage =
|
||||
{
|
||||
local vector dir;
|
||||
local entity oldself;
|
||||
local float save;
|
||||
local float take, severity, helm;
|
||||
local string s;
|
||||
local string attackerteam, targteam;
|
||||
|
||||
|
||||
|
|
|
@ -2,17 +2,109 @@ void bprint(float plev, string st, string s2){}
|
|||
float PRINT_MEDIUM = 1;
|
||||
#include "/../inventory.qc"
|
||||
|
||||
float show_inventory;
|
||||
|
||||
vector mousepos;
|
||||
|
||||
float showcontextmenu;
|
||||
vector contextpos;
|
||||
float slotnum;
|
||||
|
||||
vector toppos = '0 32 0';
|
||||
|
||||
float k_mouse1;
|
||||
|
||||
void() Invent_Draw =
|
||||
{
|
||||
local float i;
|
||||
local float it;
|
||||
local string itname;
|
||||
local float op;
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
it = getstati(32+i);
|
||||
itname = GetItemName(ToIID(it));
|
||||
drawstring('0 32 0' + (i * '0 8 0'), strcat(itname, " (", ftos(ToStatus(it)), ")"), '8 8 0', '1 1 1', 1);
|
||||
drawstring(toppos + (i * '0 8 0'), strcat(itname, " (", ftos(ToStatus(it)), ")"), '8 8 0', '1 1 1', 1);
|
||||
}
|
||||
|
||||
if (showcontextmenu)
|
||||
{
|
||||
op = floor((mousepos_y - contextpos_y)/8);
|
||||
drawfill(contextpos - '8 8 0', '88 24 0'+'16 16 0', '0 0 0', 0.7);
|
||||
drawstring(contextpos + (0 * '0 8 0'), "Use/Reload", '8 8 0', '1 1 0' + (op!=0)*'0 0 1', 1);
|
||||
drawstring(contextpos + (1 * '0 8 0'), "Put In Hand", '8 8 0', '1 1 0' + (op!=1)*'0 0 1', 1);
|
||||
drawstring(contextpos + (2 * '0 8 0'), "Drop", '8 8 0', '1 1 0' + (op!=2)*'0 0 1', 1);
|
||||
}
|
||||
else
|
||||
slotnum = floor((mousepos_y - toppos_y)/8) + 1;
|
||||
|
||||
|
||||
drawfill(mousepos, '8 8 0', '0 0 0', 0.7);
|
||||
drawstring(mousepos, "^", '8 8 0', '1 1 1', 1);
|
||||
// drawpic(mousepos, "gui/cursor.jpg", '32 32 0', '1 1 1', 1);
|
||||
};
|
||||
|
||||
|
||||
float(float eventtype, float param1, float param2) CSQC_InputEvent =
|
||||
{
|
||||
local float op;
|
||||
if (eventtype == 0)
|
||||
{
|
||||
if (param1 == 'i')
|
||||
show_inventory = !show_inventory;
|
||||
else if (!show_inventory)
|
||||
return false;
|
||||
else if (param1 == k_mouse1)
|
||||
{
|
||||
if (showcontextmenu)
|
||||
{
|
||||
op = floor((mousepos_y - contextpos_y)/8);
|
||||
|
||||
if (op == 0)
|
||||
localcmd(strcat("cmd invuse ", ftos(slotnum), "\n"));
|
||||
else if (op == 1)
|
||||
localcmd(strcat("cmd invswap 1 ", ftos(slotnum), "\nimpulse 1\n"));
|
||||
else if (op == 2)
|
||||
localcmd(strcat("cmd invdrop ", ftos(slotnum), "\n"));
|
||||
|
||||
|
||||
showcontextmenu = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (slotnum >= 1 && slotnum <= MAXSLOTS)
|
||||
{
|
||||
if (getstati(32+slotnum-1) != 0)
|
||||
{
|
||||
showcontextmenu = true;
|
||||
contextpos = mousepos;
|
||||
}
|
||||
}
|
||||
else
|
||||
show_inventory = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
if (eventtype == 2 && show_inventory) //mouse
|
||||
{
|
||||
mousepos_x += param1;
|
||||
mousepos_y += param2;
|
||||
|
||||
if (mousepos_x < 0)
|
||||
mousepos_x = 0;
|
||||
if (mousepos_y < 0)
|
||||
mousepos_y = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
void() FigureOutButtons =
|
||||
{
|
||||
k_mouse1 = stringtokeynum("K_MOUSE1");
|
||||
};
|
||||
|
|
|
@ -36,6 +36,9 @@ void() CSQC_Init =
|
|||
viewentity.predraw = DoThatViewModelThing;
|
||||
viewentity.drawmask = MASK_NORMAL;
|
||||
viewentity.renderflags = RF_VIEWMODEL | RF_DEPTHHACK;
|
||||
|
||||
|
||||
FigureOutButtons();
|
||||
};
|
||||
|
||||
|
||||
|
@ -73,5 +76,6 @@ void(float do2d) CSQC_UpdateView =
|
|||
// if (usehud)
|
||||
// Hud_Draw();
|
||||
|
||||
Invent_Draw();
|
||||
if (show_inventory)
|
||||
Invent_Draw();
|
||||
};
|
|
@ -461,7 +461,7 @@ float MULTICAST_PVS_R = 5; // within sight, reliable
|
|||
float movedist;
|
||||
|
||||
string string_null; // null string, nothing should be held here
|
||||
float empty_float;
|
||||
//float empty_float;
|
||||
|
||||
entity activator; // the entity that activated a trigger or brush
|
||||
|
||||
|
@ -485,7 +485,7 @@ float no_connect;
|
|||
//
|
||||
// world fields (FIXME: make globals)
|
||||
//
|
||||
.string wad;
|
||||
noref .string wad;
|
||||
.string map;
|
||||
.float worldtype; // 0=medieval 1=metal 2=base
|
||||
|
||||
|
@ -496,7 +496,7 @@ float no_connect;
|
|||
//
|
||||
// quakeed fields
|
||||
//
|
||||
.float light_lev; // not used by game, but parsed by light util
|
||||
noref .float light_lev; // not used by game, but parsed by light util
|
||||
.float style;
|
||||
|
||||
|
||||
|
@ -533,7 +533,7 @@ float AS_MISSILE = 4;
|
|||
|
||||
// Zoid Additions
|
||||
.float maxspeed; // Used to set Maxspeed on a player
|
||||
.float gravity; // Gravity Multiplier (0 to 1.0)
|
||||
//.float gravity; // Gravity Multiplier (0 to 1.0)
|
||||
|
||||
|
||||
|
||||
|
@ -577,16 +577,16 @@ float red_armor;
|
|||
.float dtime;
|
||||
.float active;
|
||||
.float class;
|
||||
.float vote1;
|
||||
.float vote2;
|
||||
.float vote3;
|
||||
.float vote4;
|
||||
.float vote5;
|
||||
.float vote6;
|
||||
.float vote7;
|
||||
.float override;
|
||||
//.float vote1;
|
||||
//.float vote2;
|
||||
//.float vote3;
|
||||
//.float vote4;
|
||||
//.float vote5;
|
||||
//.float vote6;
|
||||
//.float vote7;
|
||||
//.float override;
|
||||
.entity track;
|
||||
.float recharge;
|
||||
//.float recharge;
|
||||
.float processed;
|
||||
.float current_slot;
|
||||
.float attack;
|
||||
|
@ -604,10 +604,10 @@ float red_armor;
|
|||
.float pcamera;
|
||||
.float pcamera2;
|
||||
.float equipment_state;
|
||||
.float select;
|
||||
.float grenade_hold;
|
||||
//.float select;
|
||||
//.float grenade_hold;
|
||||
.float grab;
|
||||
.float vehicle;
|
||||
//.float vehicle;
|
||||
|
||||
.float weight;
|
||||
.float max_weight;
|
||||
|
@ -619,13 +619,13 @@ float red_armor;
|
|||
.float scraps;
|
||||
.float cycle1;
|
||||
.float cycle2;
|
||||
.float c4;
|
||||
//.float c4;
|
||||
.float trait;
|
||||
.float protect;
|
||||
.float perk;
|
||||
.float equipment;
|
||||
.float buildtype;
|
||||
.float ctimer;
|
||||
//.float ctimer;
|
||||
.float flash;
|
||||
.float oldteam;
|
||||
.float dead;
|
||||
|
@ -636,7 +636,7 @@ float red_armor;
|
|||
.string armornoise;
|
||||
.string ammotype1;
|
||||
.string ammotype2;
|
||||
.string deathsound;
|
||||
//.string deathsound;
|
||||
.string currentmenu;
|
||||
|
||||
.entity friend;
|
||||
|
@ -657,7 +657,8 @@ float red_armor;
|
|||
//
|
||||
// doors, etc
|
||||
//
|
||||
.vector dest, dest1, dest2;
|
||||
//.vector dest;
|
||||
.vector dest1, dest2;
|
||||
.float wait; // time from firing to restarting
|
||||
.float delay; // time from activation to firing
|
||||
.entity trigger_field; // door's trigger entity
|
||||
|
@ -704,9 +705,10 @@ float red_armor;
|
|||
//
|
||||
// sounds
|
||||
//
|
||||
.float waitmin, waitmax;
|
||||
.float distance;
|
||||
.float volume;
|
||||
.float waitmin;
|
||||
//.float waitmax;
|
||||
//.float distance;
|
||||
//.float volume;
|
||||
|
||||
|
||||
|
||||
|
@ -820,6 +822,9 @@ float(string s) stof = #81; // convert strin
|
|||
void(vector where, float set) multicast = #82; // sends the temp message to a set
|
||||
// of clients, possibly in PVS or PHS
|
||||
|
||||
|
||||
string(...) strcat = #115;
|
||||
|
||||
//============================================================================
|
||||
|
||||
//
|
||||
|
|
|
@ -294,8 +294,6 @@ float() CheckDemonJump =
|
|||
|
||||
float() DemonCheckAttack =
|
||||
{
|
||||
local vector vec;
|
||||
|
||||
// if close enough for slashing, go for it
|
||||
if (CheckDemonMelee ())
|
||||
{
|
||||
|
|
|
@ -341,7 +341,6 @@ void () woof_pain =
|
|||
void (vector stuff) spawn_live_dog =
|
||||
{
|
||||
local entity dog;
|
||||
local entity te;
|
||||
|
||||
dog = spawn ();
|
||||
dog.origin = stuff;
|
||||
|
@ -435,8 +434,6 @@ float() CheckDogJump =
|
|||
|
||||
float() DogCheckAttack =
|
||||
{
|
||||
local vector vec;
|
||||
|
||||
// if close enough for slashing, go for it
|
||||
if (CheckDogMelee ())
|
||||
{
|
||||
|
|
|
@ -157,7 +157,6 @@ void () door_killed =
|
|||
void () OpenDoorBeep =
|
||||
{
|
||||
local float r;
|
||||
local string stuff;
|
||||
|
||||
r = range (self.enemy);
|
||||
|
||||
|
@ -191,7 +190,7 @@ void () OpenDoorBeep =
|
|||
|
||||
void (entity portal, entity toucher) SpawnOpenDoor =
|
||||
{
|
||||
local entity open, oself;
|
||||
local entity open;
|
||||
|
||||
open = spawn();
|
||||
setorigin (open, toucher.origin + '0 0 48');
|
||||
|
@ -206,9 +205,6 @@ void (entity portal, entity toucher) SpawnOpenDoor =
|
|||
|
||||
void () door_touch =
|
||||
{
|
||||
local float x;
|
||||
local string stuff;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
|
||||
|
|
|
@ -60,14 +60,7 @@ void (float tmp, float dam) enforcer_single =
|
|||
local vector dir;
|
||||
local vector direction;
|
||||
local entity en;
|
||||
local float r;
|
||||
local vector targ;
|
||||
local vector org;
|
||||
local vector org2;
|
||||
local float zdif;
|
||||
local float ydif;
|
||||
local float xdif;
|
||||
local float true;
|
||||
|
||||
if (self.enemy.sneak == 1)
|
||||
tmp = tmp * 2;
|
||||
|
|
|
@ -287,7 +287,6 @@ float() ShamCheckAttack =
|
|||
{
|
||||
local vector spot1, spot2;
|
||||
local entity targ;
|
||||
local float chance;
|
||||
|
||||
if (enemy_range == RANGE_MELEE)
|
||||
{
|
||||
|
|
|
@ -122,7 +122,6 @@ void () hos_deatha5 = [ 10, hos_deatha5 ]
|
|||
|
||||
void (float xx) hos_forward =
|
||||
{
|
||||
local vector dir;
|
||||
local float rng;
|
||||
local entity te;
|
||||
local string qqq;
|
||||
|
|
|
@ -72,6 +72,7 @@ float IID_ARM_FORCE = 207;
|
|||
float IID_ARM_LPOWER = 208;
|
||||
|
||||
//stims
|
||||
#define IsChem(iid) (iid >= IID_CHEM_STIMPACK && iid <= IID_CHEM_BESERK)
|
||||
float IID_CHEM_STIMPACK = 301;
|
||||
float IID_CHEM_MEDICALBAG = 302;
|
||||
float IID_CHEM_SUPERSTIM = 303;
|
||||
|
@ -351,6 +352,84 @@ string(float iid) GetItemVModel =
|
|||
return "";
|
||||
};
|
||||
|
||||
string(float iid) GetItemWModel =
|
||||
{
|
||||
if (iid == IID_WP_KNIFE)
|
||||
return "progs/w_knife.mdl";
|
||||
if (iid == IID_WP_AXE)
|
||||
return "progs/w_knife.mdl";
|
||||
if (iid == IID_WP_VIBROBLADE)
|
||||
return "progs/w_axe.mdl";
|
||||
if (iid == IID_WP_POWERAXE)
|
||||
return "progs/w_axe.mdl";
|
||||
|
||||
if (iid == IID_WP_USP)
|
||||
return "progs/w_1911.mdl";
|
||||
if (iid == IID_WP_DEAGLE)
|
||||
return "progs/w_deagle.mdl";
|
||||
if (iid == IID_WP_NEEDLER)
|
||||
return "progs/w_1911.mdl";
|
||||
if (iid == IID_WP_ALIENBLASTER)
|
||||
return "progs/w_alien.mdl";
|
||||
if (iid == IID_WP_PIPERIFLE)
|
||||
return "progs/w_pipe.mdl";
|
||||
if (iid == IID_WP_WINCHESTER)
|
||||
return "progs/w_shotgun.mdl";
|
||||
if (iid == IID_WP_MOSSBERG)
|
||||
return "progs/w_pipe.mdl";
|
||||
if (iid == IID_WP_JACKHAMMER)
|
||||
return "progs/w_jackhammer.mdl";
|
||||
|
||||
if (iid == IID_WP_MP9)
|
||||
return "progs/w_mp9.mdl";
|
||||
if (iid == IID_WP_MP7)
|
||||
return "progs/w_mp7.mdl";
|
||||
if (iid == IID_WP_RANGERMASTER)
|
||||
return "progs/w_rangem.mdl";
|
||||
if (iid == IID_WP_AK112)
|
||||
return "progs/w_ak47.mdl";
|
||||
if (iid == IID_WP_AK74)
|
||||
return "progs/w_ak47.mdl";
|
||||
if (iid == IID_WP_DKS1)
|
||||
return "progs/w_srifle.mdl";
|
||||
if (iid == IID_WP_MOONLIGHT)
|
||||
return "progs/w_night.mdl";
|
||||
if (iid == IID_WP_SA80)
|
||||
return "progs/w_sa80.mdl";
|
||||
|
||||
if (iid == IID_WP_GAUSERIFLE)
|
||||
return "progs/w_gauss.mdl";
|
||||
if (iid == IID_WP_PULSERIFLE)
|
||||
return "progs/w_carbine.mdl";
|
||||
|
||||
if (iid == IID_GREN_FRAG)
|
||||
return "progs/grenade2.mdl";
|
||||
if (iid == IID_GREN_EMP)
|
||||
return "progs/grenade2.mdl";
|
||||
if (iid == IID_GREN_SMOKE)
|
||||
return "progs/grenade2.mdl";
|
||||
if (iid == IID_GREN_FLASH)
|
||||
return "progs/grenade2.mdl";
|
||||
|
||||
if (iid == IID_CHEM_STIMPACK)
|
||||
return "maps/b_bh10.bsp";
|
||||
if (iid == IID_CHEM_MEDICALBAG)
|
||||
return "maps/b_bh25.bsp";
|
||||
if (iid == IID_CHEM_SUPERSTIM)
|
||||
return "maps/b_bh100.bsp";
|
||||
|
||||
//fixme
|
||||
if (iid == IID_CHEM_ADRENALINE)
|
||||
return "maps/b_bh10.bsp";
|
||||
if (iid == IID_CHEM_PSYCHO)
|
||||
return "maps/b_bh25.bsp";
|
||||
if (iid == IID_CHEM_BESERK)
|
||||
return "maps/b_bh100.bsp";
|
||||
|
||||
|
||||
return "progs/s_light.spr"; //no model. :/
|
||||
};
|
||||
|
||||
float(float iid) WeaponAmmoType =
|
||||
{
|
||||
if (iid == IID_WP_USP)
|
||||
|
|
|
@ -28,8 +28,6 @@ void() q_touch;
|
|||
|
||||
void() q_touch =
|
||||
{
|
||||
local entity stemp;
|
||||
local float best;
|
||||
local string s;
|
||||
|
||||
if (other.classname != "player")
|
||||
|
@ -98,8 +96,6 @@ void() r_touch;
|
|||
|
||||
void() r_touch =
|
||||
{
|
||||
local entity stemp;
|
||||
local float best;
|
||||
local string s;
|
||||
|
||||
if (other.classname != "player")
|
||||
|
@ -307,9 +303,6 @@ float (entity to, float iid, float quant) TryGiveStackable =
|
|||
|
||||
void () health_touch =
|
||||
{
|
||||
local float amount;
|
||||
local string s;
|
||||
|
||||
if (other.classname != "player" || other.ghost != 0)
|
||||
return;
|
||||
|
||||
|
@ -1087,9 +1080,6 @@ KEYS
|
|||
|
||||
void() key_touch =
|
||||
{
|
||||
local entity stemp;
|
||||
local float best;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
if (other.health <= 0)
|
||||
|
@ -1220,9 +1210,6 @@ END OF LEVEL RUNES
|
|||
|
||||
void() sigil_touch =
|
||||
{
|
||||
local entity stemp;
|
||||
local float best;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
if (other.health <= 0)
|
||||
|
@ -1293,9 +1280,6 @@ void() powerup_touch;
|
|||
|
||||
void() powerup_touch =
|
||||
{
|
||||
local entity stemp;
|
||||
local float best;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
if (other.health <= 0)
|
||||
|
|
|
@ -500,7 +500,6 @@ void() bubble_remove =
|
|||
void() bubble_bob =
|
||||
{
|
||||
local float rnd1, rnd2, rnd3;
|
||||
local vector vtmp1, modi;
|
||||
|
||||
self.cnt = self.cnt + 1;
|
||||
if (self.cnt == 4)
|
||||
|
|
|
@ -48,8 +48,6 @@ enemy as activator.
|
|||
*/
|
||||
void() monster_death_use =
|
||||
{
|
||||
local entity ent, otemp, stemp;
|
||||
|
||||
// fall to ground
|
||||
if (self.flags & FL_FLY)
|
||||
self.flags = self.flags - FL_FLY;
|
||||
|
@ -68,9 +66,6 @@ void() monster_death_use =
|
|||
|
||||
void() walkmonster_start_go =
|
||||
{
|
||||
local string stemp;
|
||||
local entity etemp;
|
||||
|
||||
self.origin_z = self.origin_z + 1; // raise off floor a bit
|
||||
droptofloor();
|
||||
|
||||
|
|
|
@ -634,8 +634,6 @@ void () ogre_paine15 = [ 111, ogre_run1 ]
|
|||
|
||||
void (entity attacker, float damage) ogre_pain =
|
||||
{
|
||||
local float r;
|
||||
|
||||
if (self.pain_finished > time)
|
||||
return;
|
||||
|
||||
|
@ -800,7 +798,6 @@ void () mutant_pain =
|
|||
void (vector stuff, vector ang) spawn_live_ogre =
|
||||
{
|
||||
local entity ogre;
|
||||
local entity te;
|
||||
|
||||
ogre = spawn ();
|
||||
ogre.origin = stuff;
|
||||
|
@ -823,9 +820,6 @@ void (vector stuff, vector ang) spawn_live_ogre =
|
|||
|
||||
void () ogre_die =
|
||||
{
|
||||
local string attack_total;
|
||||
local string damage_total;
|
||||
|
||||
if (self.enemy.classname == "player")
|
||||
self.enemy.frags = self.enemy.frags + 1;
|
||||
|
||||
|
|
|
@ -146,10 +146,7 @@ Set "sounds" to one of the following:
|
|||
|
||||
|
||||
void() func_plat =
|
||||
|
||||
{
|
||||
local entity t;
|
||||
|
||||
if (!self.t_length)
|
||||
self.t_length = 80;
|
||||
if (!self.t_width)
|
||||
|
|
|
@ -146,8 +146,6 @@ void () player_climb = [ 23, player_run ]
|
|||
|
||||
void () player_run = [ 137, player_run ]
|
||||
{
|
||||
local float crap;
|
||||
|
||||
if (self.rtime < time)
|
||||
self.weaponframe = 0;
|
||||
|
||||
|
@ -687,7 +685,7 @@ void () player_knife1 = [ 155, player_knife2 ]
|
|||
void () player_knife2 = [ 156, player_knife3 ]
|
||||
{
|
||||
self.weaponframe = WEAPON_ROCKET;
|
||||
FireMelee ();
|
||||
W_FireMelee ();
|
||||
};
|
||||
|
||||
void () player_knife3 = [ 157, player_run ]
|
||||
|
@ -703,7 +701,7 @@ void () player_knifea = [ 155, player_knifeb ]
|
|||
void () player_knifeb = [ 156, player_knifec ]
|
||||
{
|
||||
self.weaponframe = MULTICAST_PVS_R;
|
||||
FireMelee ();
|
||||
W_FireMelee ();
|
||||
};
|
||||
|
||||
void () player_knifec = [ 157, player_run ]
|
||||
|
@ -796,8 +794,6 @@ void (float num_bubbles) DeathBubbles;
|
|||
|
||||
void () PainSound =
|
||||
{
|
||||
local float rs;
|
||||
|
||||
if ((self.equipment == 8))
|
||||
return;
|
||||
|
||||
|
@ -953,7 +949,6 @@ void (float num_bubbles) DeathBubbles =
|
|||
|
||||
void () DeathSound =
|
||||
{
|
||||
local float rs;
|
||||
local float r;
|
||||
|
||||
if ((self.equipment == 8))
|
||||
|
@ -1068,8 +1063,6 @@ void () SmokeBob2 =
|
|||
local float rnd1;
|
||||
local float rnd2;
|
||||
local float rnd3;
|
||||
local vector vtmp1;
|
||||
local vector modi;
|
||||
|
||||
self.cnt = (self.cnt + WEAPON_SHOTGUN);
|
||||
if ((self.cnt >= (WEAPON_ROCKET + (random () * AS_MELEE))))
|
||||
|
|
|
@ -11,14 +11,7 @@ void (float tmp, float dam) army_fire =
|
|||
local vector dir;
|
||||
local vector direction;
|
||||
local entity en;
|
||||
local float r;
|
||||
local vector targ;
|
||||
local vector org;
|
||||
local vector org2;
|
||||
local float zdif;
|
||||
local float ydif;
|
||||
local float xdif;
|
||||
local float true;
|
||||
|
||||
if (self.enemy.sneak == 1)
|
||||
tmp = tmp * 2;
|
||||
|
@ -79,14 +72,7 @@ void (float tmp, float dam) army_fire1 =
|
|||
local vector dir;
|
||||
local vector direction;
|
||||
local entity en;
|
||||
local float r;
|
||||
local vector targ;
|
||||
local vector org;
|
||||
local vector org2;
|
||||
local float zdif;
|
||||
local float ydif;
|
||||
local float xdif;
|
||||
local float true;
|
||||
|
||||
if (self.enemy.sneak == 1)
|
||||
tmp = tmp * 2;
|
||||
|
@ -146,13 +132,9 @@ void (float tmp, float dam) army_fire2 =
|
|||
local vector dir;
|
||||
local vector direction;
|
||||
local entity en;
|
||||
local float r;
|
||||
local vector targ;
|
||||
local vector org;
|
||||
local vector org2;
|
||||
local float var_u, var_r, var_o;
|
||||
local float shot;
|
||||
local float dif;
|
||||
|
||||
if (self.enemy.sneak == 1)
|
||||
tmp = tmp * 2;
|
||||
|
@ -245,14 +227,7 @@ void (float tmp, float dam) army_fire3 =
|
|||
local vector dir;
|
||||
local vector direction;
|
||||
local entity en;
|
||||
local float r;
|
||||
local vector targ;
|
||||
local vector org;
|
||||
local vector org2;
|
||||
local float zdif;
|
||||
local float ydif;
|
||||
local float xdif;
|
||||
local float true;
|
||||
|
||||
if (self.mag1 == 0)
|
||||
{
|
||||
|
@ -309,15 +284,7 @@ void (float tmp, float dam) army_fire4 =
|
|||
local vector dir;
|
||||
local vector direction;
|
||||
local entity en;
|
||||
local float r;
|
||||
local vector targ;
|
||||
local vector org;
|
||||
local vector org2;
|
||||
local float zdif;
|
||||
local float ydif;
|
||||
local float xdif;
|
||||
local float true;
|
||||
local float shot_num;
|
||||
|
||||
if (self.mag1 == 0)
|
||||
{
|
||||
|
@ -773,8 +740,6 @@ void () army_atkcs4 = [ 84, army_atkcs5 ]
|
|||
|
||||
void () army_atkcs5 = [ 85, army_atkcs6 ]
|
||||
{
|
||||
local float r;
|
||||
|
||||
ai_face ();
|
||||
sound (self, CHAN_WEAPON, "weapons/ak112.wav", PLAT_LOW_TRIGGER, ATTN_NORM);
|
||||
army_fire4 (100, 16);
|
||||
|
@ -1260,7 +1225,6 @@ void () grunt_pain =
|
|||
void (vector stuff, vector ang) spawn_live_grunt =
|
||||
{
|
||||
local entity grunt;
|
||||
local entity te;
|
||||
|
||||
grunt = spawn ();
|
||||
grunt.origin = stuff;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
entity stemp, otemp, s, old;
|
||||
//entity s;
|
||||
|
||||
|
||||
void() trigger_reactivate =
|
||||
|
@ -221,8 +221,6 @@ void() trigger_secret =
|
|||
|
||||
void() counter_use =
|
||||
{
|
||||
local string junk;
|
||||
|
||||
self.count = self.count - 1;
|
||||
if (self.count < 0)
|
||||
return;
|
||||
|
@ -302,6 +300,7 @@ void() play_teleport =
|
|||
|
||||
void(vector org) spawn_tfog =
|
||||
{
|
||||
local entity s;
|
||||
s = spawn ();
|
||||
s.origin = org;
|
||||
s.nextthink = time + 0.2;
|
||||
|
|
|
@ -10,11 +10,11 @@ void (float dam, float rec, string snd, float rng, float rate) FireAssaultRifle;
|
|||
void (float dam, float rec, string snd, float rng, float rate) FirePistol;
|
||||
void (float dam, float rec, string snd, float rng, float rate) FireSMG;
|
||||
void () W_PlayerMenu;
|
||||
void () UseChem;
|
||||
//void () UseChem;
|
||||
void () Special;
|
||||
void () BuyMenu;
|
||||
void() Sneak;
|
||||
void() Bandage;
|
||||
//void() Bandage;
|
||||
void() Shield;
|
||||
void () player_throw1;
|
||||
void() player_knife1;
|
||||
|
@ -26,6 +26,9 @@ void (float slot, float snd, float drop) DropFromSlot;
|
|||
void() PositionControl;
|
||||
void() autofire;
|
||||
void() autofire_s;
|
||||
float(float iid) UseBoostingChem;
|
||||
float(float iid) UseHealingChem;
|
||||
float(float slotno) DecreaseDestroySlot;
|
||||
|
||||
#define weightx() (self.weight)
|
||||
|
||||
|
@ -91,6 +94,37 @@ void(float damage, float dist, float rate) FireMelee =
|
|||
}
|
||||
};
|
||||
|
||||
void() W_FireMelee =
|
||||
{
|
||||
local float iid;
|
||||
iid = ToIID(self.(SlotField(self.current_slot)));
|
||||
if (iid == IID_WP_KNIFE)
|
||||
FireMelee(5, 32, 0.2);
|
||||
else if (iid == IID_WP_AXE)
|
||||
FireMelee(10, 64, 0.2);
|
||||
else if (iid == IID_WP_VIBROBLADE)
|
||||
FireMelee(25, 64, 0.2);
|
||||
else if (iid == IID_WP_POWERAXE)
|
||||
FireMelee(50, 96, 0.2);
|
||||
|
||||
else if (iid == IID_CHEM_STIMPACK ||
|
||||
iid == IID_CHEM_MEDICALBAG ||
|
||||
iid == IID_CHEM_SUPERSTIM)
|
||||
{
|
||||
if (UseHealingChem(iid))
|
||||
DecreaseDestroySlot(self.current_slot);
|
||||
}
|
||||
else if (iid == IID_CHEM_ADRENALINE ||
|
||||
iid == IID_CHEM_PSYCHO ||
|
||||
iid == IID_CHEM_BESERK)
|
||||
{
|
||||
if (UseBoostingChem(iid))
|
||||
DecreaseDestroySlot(self.current_slot);
|
||||
}
|
||||
else
|
||||
dprint(strcat("W_FireMelee - ", ftos(iid), "not implemented\n"));
|
||||
};
|
||||
|
||||
|
||||
//============================================================================
|
||||
|
||||
|
@ -666,7 +700,6 @@ void(vector org, vector dir) launch_spike =
|
|||
void() W_FireSuperSpikes =
|
||||
{
|
||||
local vector dir;
|
||||
local entity old;
|
||||
|
||||
sound (self, CHAN_WEAPON, "weapons/spike2.wav", 1, ATTN_NORM);
|
||||
self.attack_finished = time + 0.2;
|
||||
|
@ -684,7 +717,6 @@ void() W_FireSuperSpikes =
|
|||
void(float ox) W_FireSpikes =
|
||||
{
|
||||
local vector dir;
|
||||
local entity old;
|
||||
|
||||
makevectors (self.v_angle);
|
||||
|
||||
|
@ -714,10 +746,9 @@ void(float ox) W_FireSpikes =
|
|||
|
||||
|
||||
|
||||
.float hit_z;
|
||||
//.float hit_z;
|
||||
void() spike_touch =
|
||||
{
|
||||
local float rand;
|
||||
if (other == self.owner)
|
||||
return;
|
||||
|
||||
|
@ -763,7 +794,6 @@ local float rand;
|
|||
|
||||
void() superspike_touch =
|
||||
{
|
||||
local float rand;
|
||||
if (other == self.owner)
|
||||
return;
|
||||
|
||||
|
@ -815,56 +845,10 @@ PLAYER WEAPON USE
|
|||
void() SetWeaponModel =
|
||||
{
|
||||
self.weaponmodel = GetItemVModel(ToIID(ItemInSlot(self, self.current_slot)));
|
||||
|
||||
/*
|
||||
if (temp_weapon == 0)
|
||||
self.weaponmodel = "progs/v_fist.mdl";
|
||||
else if (temp_weapon == 1)
|
||||
self.weaponmodel = "progs/v_knife.mdl";
|
||||
else if (temp_weapon == 2)
|
||||
self.weaponmodel = "progs/v_axe.mdl";
|
||||
else if (temp_weapon == 3)
|
||||
self.weaponmodel = "progs/v_knife.mdl";
|
||||
else if (temp_weapon == 4)
|
||||
self.weaponmodel = "progs/v_axe.mdl";
|
||||
else if (temp_weapon == 5)
|
||||
self.weaponmodel = "progs/v_1911.mdl";
|
||||
else if (temp_weapon == 6)
|
||||
self.weaponmodel = "progs/v_deagle.mdl";
|
||||
else if (temp_weapon == 7)
|
||||
self.weaponmodel = "progs/v_1911.mdl";
|
||||
else if (temp_weapon == 8)
|
||||
self.weaponmodel = "progs/v_alien.mdl";
|
||||
else if (temp_weapon == 9)
|
||||
self.weaponmodel = "progs/v_piperifle.mdl";
|
||||
else if (temp_weapon == 10)
|
||||
self.weaponmodel = "progs/v_double.mdl";
|
||||
else if (temp_weapon == 11)
|
||||
self.weaponmodel = "progs/v_shotgun.mdl";
|
||||
else if (temp_weapon == 12)
|
||||
self.weaponmodel = "progs/v_jackhammer.mdl";
|
||||
else if (temp_weapon == 13)
|
||||
self.weaponmodel = "progs/v_mp9.mdl";
|
||||
else if (temp_weapon == 14)
|
||||
self.weaponmodel = "progs/v_mp5.mdl";
|
||||
else if (temp_weapon == 15)
|
||||
self.weaponmodel = "progs/v_rangem.mdl";
|
||||
else if (temp_weapon == 16)
|
||||
self.weaponmodel = "progs/v_ak47.mdl";
|
||||
else if (temp_weapon == 17)
|
||||
self.weaponmodel = "progs/v_ak47.mdl";
|
||||
else if (temp_weapon == 18)
|
||||
self.weaponmodel = "progs/v_srifle.mdl";
|
||||
else if (temp_weapon == 19)
|
||||
self.weaponmodel = "progs/v_night.mdl";
|
||||
else if (temp_weapon == 99)
|
||||
self.weaponmodel = "progs/v_handgren.mdl";
|
||||
*/
|
||||
};
|
||||
|
||||
void() W_SetCurrentAmmo =
|
||||
{
|
||||
local float temp_weapon;
|
||||
local string x;
|
||||
|
||||
player_run (); // get out of any weapon firing states
|
||||
|
@ -1055,7 +1039,7 @@ An attack impulse can be triggered now
|
|||
|
||||
void() W_Attack =
|
||||
{
|
||||
local float weap, r;
|
||||
local float weap;
|
||||
|
||||
makevectors (self.v_angle); // calculate forward angle for velocity
|
||||
self.show_hostile = time + 1; // wake monsters up
|
||||
|
@ -1108,6 +1092,10 @@ void() W_Attack =
|
|||
else if (weap == IID_WP_MOONLIGHT)
|
||||
FireAssaultRifle(16, 2, "weapons/m4a1.wav", 4000, 0.1);
|
||||
|
||||
//float IID_WP_SA80 = 420;
|
||||
//float IID_WP_GAUSERIFLE = 421;
|
||||
//float IID_WP_PULSERIFLE = 422;
|
||||
|
||||
else if (weap == IID_GREN_FRAG)
|
||||
player_throw1();
|
||||
else if (weap == IID_GREN_EMP)
|
||||
|
@ -1117,9 +1105,12 @@ void() W_Attack =
|
|||
else if (weap == IID_GREN_FLASH)
|
||||
player_throw1();
|
||||
|
||||
//float IID_WP_SA80 = 420;
|
||||
//float IID_WP_GAUSERIFLE = 421;
|
||||
//float IID_WP_PULSERIFLE = 422;
|
||||
|
||||
else if (IsChem(weap))
|
||||
{
|
||||
self.attack_finished = time + 0.25;
|
||||
player_knife1 ();
|
||||
}
|
||||
else
|
||||
centerprint(self, "Not implemented (", ftos(weap), ")");
|
||||
};
|
||||
|
@ -1132,7 +1123,7 @@ W_ChangeWeapon
|
|||
*/
|
||||
void() W_ChangeWeapon =
|
||||
{
|
||||
local float it, am, fl, r;
|
||||
local float it, am, fl;
|
||||
|
||||
it = self.items;
|
||||
am = 0;
|
||||
|
@ -1260,8 +1251,6 @@ void () ProneOff =
|
|||
|
||||
void () ProneOn =
|
||||
{
|
||||
local string x;
|
||||
|
||||
if (self.velocity_z != 0)
|
||||
return;
|
||||
|
||||
|
@ -1584,13 +1573,8 @@ void (vector org) bullet_hole =
|
|||
void (vector test, float length, float dam) penetrate =
|
||||
{
|
||||
local vector org;
|
||||
local vector org2;
|
||||
local vector start;
|
||||
local vector end;
|
||||
local vector end2;
|
||||
local float zdif;
|
||||
local float ydif;
|
||||
local float xdif;
|
||||
local float go;
|
||||
local float tl;
|
||||
|
||||
|
@ -1710,9 +1694,6 @@ void (vector org) CreateSmoke =
|
|||
|
||||
void () SmokeThink =
|
||||
{
|
||||
local entity te;
|
||||
local float ct;
|
||||
|
||||
self.cnt = (self.cnt + 1);
|
||||
|
||||
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
|
||||
|
@ -1759,8 +1740,6 @@ void () FragExplode =
|
|||
|
||||
void () PlasmaExplode =
|
||||
{
|
||||
local float r;
|
||||
|
||||
sound (self, CHAN_VOICE, "ambience/gunfire7.wav", 1, ATTN_NONE);
|
||||
self.origin = (self.origin + '0 0 16');
|
||||
self.velocity = VEC_ORIGIN;
|
||||
|
@ -1883,16 +1862,16 @@ void () HandGrenBounce =
|
|||
void () FireHandGrenade =
|
||||
{
|
||||
local float item, iid;
|
||||
local float count;
|
||||
local float amcount;
|
||||
|
||||
item = ItemInSlot(self, self.current_slot);
|
||||
iid = ToIID(item);
|
||||
count = ToStatus(item);
|
||||
amcount = ToStatus(item);
|
||||
if (iid == 0)
|
||||
return;
|
||||
|
||||
self.currentammo = count-1;
|
||||
if (count <= 1)
|
||||
self.currentammo = amcount-1;
|
||||
if (amcount <= 1)
|
||||
SetItemSlot(self, self.current_slot, 0);
|
||||
else
|
||||
SetItemSlot(self, self.current_slot, SlotVal(iid, self.currentammo));
|
||||
|
@ -1967,9 +1946,8 @@ void(float slot, float magazine) GiveAmmo =
|
|||
|
||||
void (float dam, float rec, string snd, float rng, float rate) FirePistol =
|
||||
{
|
||||
local float tmp, var1, var2, zdif, xdif, ydif, tru;
|
||||
local float tmp, zdif, xdif, ydif, tru;
|
||||
local vector dir, source, targ, org, org2, adjust;
|
||||
local string x;
|
||||
|
||||
|
||||
stuffcmd(self, "-attack\n");
|
||||
|
@ -2078,9 +2056,8 @@ void (float dam, float rec, string snd, float rng, float rate) FirePistol =
|
|||
|
||||
void (float dam, float rec, string snd, float rng, float rate) FireSMG =
|
||||
{
|
||||
local float tmp, var1, var2, zdif, xdif, ydif, tru;
|
||||
local float tmp, zdif, xdif, ydif, tru;
|
||||
local vector dir, source, targ, org, org2, adjust;
|
||||
local string x;
|
||||
|
||||
|
||||
sound (self, CHAN_WEAPON, snd, 1, ATTN_NORM);
|
||||
|
@ -2187,10 +2164,9 @@ void (float dam, float rec, string snd, float rng, float rate) FireSMG =
|
|||
|
||||
void (float dam, float rec, string snd, float rng, float rate) FireAssaultRifle =
|
||||
{
|
||||
local float tmp, var1, var2, zdif, xdif, ydif, tru, z;
|
||||
local float tmp, zdif, xdif, ydif, tru, z;
|
||||
|
||||
local vector dir, source, targ, org, org2, adjust;
|
||||
local string x;
|
||||
|
||||
sound (self, CHAN_WEAPON, snd, 1, ATTN_NORM);
|
||||
|
||||
|
@ -2452,58 +2428,7 @@ void (float slotnum, float snd, float force) DropFromSlot =
|
|||
newmis.velocity = (newmis.velocity * 500);
|
||||
newmis.angles_y = (random () * 360);
|
||||
|
||||
mdel = "progs/w_1911.mdl";
|
||||
|
||||
if (weap == 1)
|
||||
mdel = "progs/w_knife.mdl";
|
||||
if (weap == 2)
|
||||
mdel = "progs/w_knife.mdl";
|
||||
if (weap == 3)
|
||||
mdel = "progs/w_axe.mdl";
|
||||
if (weap == 4)
|
||||
mdel = "progs/w_axe.mdl";
|
||||
|
||||
if (weap == 5)
|
||||
mdel = "progs/w_1911.mdl";
|
||||
if (weap == 6)
|
||||
mdel = "progs/w_deagle.mdl";
|
||||
if (weap == 7)
|
||||
mdel = "progs/w_1911.mdl";
|
||||
if (weap == 8)
|
||||
mdel = "progs/w_alien.mdl";
|
||||
|
||||
if (weap == 9)
|
||||
mdel = "progs/w_pipe.mdl";
|
||||
if (weap == 10)
|
||||
mdel = "progs/w_shotgun.mdl";
|
||||
if (weap == 11)
|
||||
mdel = "progs/w_pipe.mdl";
|
||||
if (weap == 12)
|
||||
mdel = "progs/w_jackhammer.mdl";
|
||||
|
||||
if (weap == 13)
|
||||
mdel = "progs/w_mp9.mdl";
|
||||
if (weap == 14)
|
||||
mdel = "progs/w_mp7.mdl";
|
||||
|
||||
if (weap == 15)
|
||||
mdel = "progs/w_rangem.mdl";
|
||||
if (weap == 16)
|
||||
mdel = "progs/w_ak47.mdl";
|
||||
if (weap == 17)
|
||||
mdel = "progs/w_ak47.mdl";
|
||||
if (weap == 18)
|
||||
mdel = "progs/w_srifle.mdl";
|
||||
if (weap == 19)
|
||||
mdel = "progs/w_night.mdl";
|
||||
if (weap == 20)
|
||||
mdel = "progs/w_sa80.mdl";
|
||||
if (weap == 21)
|
||||
mdel = "progs/w_gauss.mdl";
|
||||
if (weap == 22)
|
||||
mdel = "progs/w_carbine.mdl";
|
||||
if (self.current_slot == 3)
|
||||
mdel = "progs/grenade2.mdl";
|
||||
mdel = GetItemWModel(ToIID(weap));
|
||||
|
||||
setmodel (newmis, mdel);
|
||||
setsize (newmis, '-2 -2 0', '2 2 1');
|
||||
|
@ -2590,7 +2515,6 @@ void (entity healer, entity saved) RevivePlayer =
|
|||
float(float iid) UseBoostingChem =
|
||||
{
|
||||
local vector source;
|
||||
local vector org;
|
||||
local string x;
|
||||
local float duration;
|
||||
|
||||
|
@ -2651,7 +2575,6 @@ float(float iid) UseBoostingChem =
|
|||
float(float iid) UseHealingChem =
|
||||
{
|
||||
local vector source;
|
||||
local vector org;
|
||||
local float heal;
|
||||
local string x;
|
||||
|
||||
|
@ -2729,10 +2652,7 @@ float(float iid) UseHealingChem =
|
|||
|
||||
void () DisplayMenu =
|
||||
{
|
||||
local entity spot;
|
||||
local string menu;
|
||||
local entity te;
|
||||
local string qq;
|
||||
|
||||
if (self.currentmenu == "none")
|
||||
return;
|
||||
|
@ -2889,12 +2809,6 @@ float (float iid) spawn_station;
|
|||
|
||||
void () ExitScreen =
|
||||
{
|
||||
local float car;
|
||||
local float q;
|
||||
local entity te;
|
||||
local string x;
|
||||
|
||||
|
||||
if (self.class == 0)
|
||||
return;
|
||||
|
||||
|
@ -3068,10 +2982,7 @@ void () station_die =
|
|||
void () station_think =
|
||||
{
|
||||
#define chemcount attack_finished
|
||||
local entity dog;
|
||||
local entity te;
|
||||
local string qq;
|
||||
local float zz, x;
|
||||
|
||||
self.nextthink = time + 2;
|
||||
self.frame = self.buildtype;
|
||||
|
@ -3399,13 +3310,6 @@ void () BuyMenu =
|
|||
{
|
||||
local float is_shop;
|
||||
local entity te;
|
||||
local entity shop;
|
||||
local entity spot;
|
||||
local entity oldself;
|
||||
local vector spot1;
|
||||
local vector spot2;
|
||||
local float r;
|
||||
local float cyc;
|
||||
local string menu;
|
||||
|
||||
if (self.currentmenu == "777")
|
||||
|
@ -3660,11 +3564,7 @@ void (vector s_aim, float dam, float tmp, float ran) W_FireBuckshotSpread1 =
|
|||
local vector source;
|
||||
local vector targ;
|
||||
local vector org;
|
||||
local float r;
|
||||
local float srange;
|
||||
local float zdif;
|
||||
local vector src;
|
||||
local vector pos;
|
||||
local float ydif;
|
||||
local float xdif;
|
||||
local float tru;
|
||||
|
@ -3731,7 +3631,6 @@ void (float rec, float number, float dam, float spread, float ran, float auto) W
|
|||
local float var2;
|
||||
local float var3;
|
||||
local float var4;
|
||||
local vector adjust;
|
||||
|
||||
if (self.velocity != '0 0 0')
|
||||
{
|
||||
|
|
|
@ -428,6 +428,12 @@ void() worldspawn =
|
|||
precache_model ("progs/w_carbine.mdl");
|
||||
precache_model ("progs/w_laser.mdl");
|
||||
|
||||
precache_model ("progs/grenade2.mdl");
|
||||
precache_model ("maps/b_bh10.bsp");
|
||||
precache_model ("maps/b_bh25.bsp");
|
||||
precache_model ("maps/b_bh100.bsp");
|
||||
precache_model ("progs/s_light.spr");
|
||||
|
||||
|
||||
precache_sound ("player/step1.wav");
|
||||
precache_sound ("player/step2.wav");
|
||||
|
@ -591,8 +597,6 @@ void() bodyque =
|
|||
|
||||
void() InitBodyQue =
|
||||
{
|
||||
local entity e;
|
||||
|
||||
bodyque_head = spawn();
|
||||
bodyque_head.classname = "bodyque";
|
||||
bodyque_head.owner = spawn();
|
||||
|
|
|
@ -161,7 +161,7 @@ ZombieFireGrenade
|
|||
*/
|
||||
void(vector st) ZombieFireGrenade =
|
||||
{
|
||||
local entity missile, mpuff;
|
||||
local entity missile;
|
||||
local vector org;
|
||||
|
||||
sound (self, CHAN_WEAPON, "zombie/z_shot1.wav", 1, ATTN_NORM);
|
||||
|
|
Loading…
Reference in a new issue