TF stuff works to an extent.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1871 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
a09352928c
commit
e8dc38d98a
15 changed files with 644 additions and 110 deletions
|
@ -53,6 +53,9 @@ void() button_use =
|
|||
|
||||
void() button_touch =
|
||||
{
|
||||
if (!triggercantouch(self, other))
|
||||
return;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
self.enemy = other;
|
||||
|
|
|
@ -37,8 +37,13 @@ void() info_intermission =
|
|||
|
||||
|
||||
|
||||
void() DecodeLevelParms;
|
||||
|
||||
void() SetChangeParms =
|
||||
{
|
||||
if (!self.current_slot) //changing without spawning?
|
||||
DecodeLevelParms(); //make sure we have our inventory!
|
||||
|
||||
/*
|
||||
if (self.health <= 0)
|
||||
{
|
||||
|
@ -91,29 +96,33 @@ void() SetChangeParms =
|
|||
|
||||
void() SetNewParms =
|
||||
{ //remember, don't use self!
|
||||
parm1 = IID_WP_USP;
|
||||
parm2 = IID_WP_KNIFE;
|
||||
parm3 = IID_ARM_SHIRT;
|
||||
parm4 = 0;
|
||||
parm5 = 0;
|
||||
parm6 = 0;
|
||||
parm7 = 0;
|
||||
parm8 = 8;
|
||||
// parm1 = IID_WP_USP;
|
||||
// parm2 = IID_WP_KNIFE;
|
||||
// parm3 = IID_ARM_SHIRT;
|
||||
// parm4 = 0;
|
||||
// parm5 = 0;
|
||||
// parm6 = 0;
|
||||
// parm7 = 0;
|
||||
parm8 = 8; //starting cash
|
||||
parm9 = 0;
|
||||
parm10 = 0;
|
||||
parm11 = 0;
|
||||
parm12 = 0;
|
||||
// parm11 = 0;
|
||||
// parm12 = 0;
|
||||
//parm13 = 0;
|
||||
parm14 = 0;
|
||||
parm15 = 0;
|
||||
// parm15 = 0;
|
||||
|
||||
|
||||
parm16 = 1;
|
||||
parm17 = SlotVal(IID_WP_USP, 12);
|
||||
//16 is the current_slot
|
||||
//17 to 32 are inventory slots.
|
||||
//the assignments were moved into PutClientInServer
|
||||
//on account of changing maps before spawning was resulting in no inventory.
|
||||
parm16 = 0;
|
||||
parm17 = 0;
|
||||
parm18 = 0;
|
||||
parm19 = SlotVal(IID_ARM_SHIRT, 1);
|
||||
parm20 = SlotVal(IID_CHEM_STIMPACK, 3);
|
||||
parm21 = SlotVal(IID_AM_10MM, 24);
|
||||
parm19 = 0;
|
||||
parm20 = 0;
|
||||
parm21 = 0;
|
||||
parm22 = 0;
|
||||
parm23 = 0;
|
||||
parm24 = 0;
|
||||
|
@ -401,8 +410,8 @@ entity() SelectSpawnPoint =
|
|||
if (coop == 1)
|
||||
ent1 = "info_player_coop";
|
||||
else
|
||||
ent1 = "spawn3";
|
||||
|
||||
ent1 = "spawn3";
|
||||
|
||||
if (ent1 == "spawn3")
|
||||
{
|
||||
if (self.team == 1)
|
||||
|
@ -532,23 +541,49 @@ void() PutClientInServer =
|
|||
|
||||
DecodeLevelParms ();
|
||||
|
||||
if (self.class == 1)
|
||||
bprint(PRINT_HIGH, "current slot=");
|
||||
bprint(PRINT_HIGH, ftos(self.current_slot));
|
||||
bprint(PRINT_HIGH, "\n");
|
||||
if (self.current_slot == 0)
|
||||
{
|
||||
x = SlotOfItem(self, IID_CHEM_MEDICALBAG);
|
||||
if (x == 0)
|
||||
AddNonStackable(self, IID_CHEM_MEDICALBAG, 1);
|
||||
}
|
||||
if (self.class == 2)
|
||||
{
|
||||
x = SlotOfItem(self, IID_EQUIP_STEALTHBOY);
|
||||
if (x == 0)
|
||||
AddNonStackable(self, IID_EQUIP_STEALTHBOY, 1);
|
||||
}
|
||||
if (self.class == 4)
|
||||
{
|
||||
x = SlotOfItem(self, IID_WP_TOOLKIT);
|
||||
if (x == 0)
|
||||
AddNonStackable(self, IID_WP_TOOLKIT, 1);
|
||||
self.current_slot = 1;
|
||||
self.islot1 = SlotVal(IID_WP_USP, 12);
|
||||
self.islot2 = 0;
|
||||
self.islot3 = SlotVal(IID_ARM_SHIRT, 1);
|
||||
self.islot4 = SlotVal(IID_CHEM_STIMPACK, 3);
|
||||
self.islot5 = SlotVal(IID_AM_10MM, 24);
|
||||
self.islot6 = 0;
|
||||
self.islot7 = 0;
|
||||
self.islot8 = 0;
|
||||
self.islot9 = 0;
|
||||
self.islot10 = 0;
|
||||
self.islot11 = 0;
|
||||
self.islot12 = 0;
|
||||
self.islot13 = 0;
|
||||
self.islot14 = 0;
|
||||
self.islot15 = 0;
|
||||
self.islot16 = 0;
|
||||
|
||||
//now give them special items for thier class.
|
||||
//you're fairly screwed if you change class.
|
||||
if (self.class == 1)
|
||||
{
|
||||
x = SlotOfItem(self, IID_CHEM_MEDICALBAG);
|
||||
if (x == 0)
|
||||
AddNonStackable(self, IID_CHEM_MEDICALBAG, 1);
|
||||
}
|
||||
if (self.class == 2)
|
||||
{
|
||||
x = SlotOfItem(self, IID_EQUIP_STEALTHBOY);
|
||||
if (x == 0)
|
||||
AddNonStackable(self, IID_EQUIP_STEALTHBOY, 1);
|
||||
}
|
||||
if (self.class == 4)
|
||||
{
|
||||
x = SlotOfItem(self, IID_WP_TOOLKIT);
|
||||
if (x == 0)
|
||||
AddNonStackable(self, IID_WP_TOOLKIT, 1);
|
||||
}
|
||||
}
|
||||
|
||||
self.attack_finished = time;
|
||||
|
@ -826,7 +861,7 @@ void () LocateSpectatorTarget =
|
|||
local entity ke;
|
||||
local entity de;
|
||||
|
||||
if (self.button1)
|
||||
if (self.button0)
|
||||
{
|
||||
bprint(PRINT_MEDIUM, self.classname);
|
||||
bprint(PRINT_MEDIUM, " is dying...\n");
|
||||
|
@ -1081,19 +1116,6 @@ void() CheckWaterJump =
|
|||
}
|
||||
};
|
||||
|
||||
void () SpeedControl =
|
||||
{
|
||||
|
||||
self.maxspeed = 200;
|
||||
|
||||
if (self.position == 1)
|
||||
self.maxspeed = self.maxspeed * 0.50;
|
||||
if (self.position == 2)
|
||||
self.maxspeed = self.maxspeed * 0.25;
|
||||
if (self.currentmenu != "none")
|
||||
self.maxspeed = 0;
|
||||
};
|
||||
|
||||
void() ArmorCheck =
|
||||
{
|
||||
local float type;
|
||||
|
@ -1171,13 +1193,13 @@ void () WeightControl =
|
|||
self.weight = wt;
|
||||
|
||||
if (self.class == 1)
|
||||
self.max_weight = 20;
|
||||
self.max_weight = 50;
|
||||
if (self.class == 2)
|
||||
self.max_weight = 20;
|
||||
self.max_weight = 50;
|
||||
if (self.class == 3)
|
||||
self.max_weight = 30;
|
||||
self.max_weight = 60;
|
||||
if (self.class == 4)
|
||||
self.max_weight = 15;
|
||||
self.max_weight = 40;
|
||||
};
|
||||
|
||||
|
||||
|
@ -1199,12 +1221,19 @@ void () PositionControl =
|
|||
if (self.position == 2)
|
||||
setsize (self, '-16 -16 -24', '16 16 0');
|
||||
|
||||
|
||||
if (self.currentmenu != "none")
|
||||
{
|
||||
self.maxspeed = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (self.position == 0)
|
||||
self.maxspeed = 300;
|
||||
self.maxspeed = 200;
|
||||
else if (self.position == 1)
|
||||
self.maxspeed = 150;
|
||||
self.maxspeed = 100;
|
||||
else //if (self.position == 2)
|
||||
self.maxspeed = 75;
|
||||
self.maxspeed = 50;
|
||||
|
||||
if (self.weight > self.max_weight) //this is the penalty for being overweight.
|
||||
{
|
||||
|
@ -1212,6 +1241,14 @@ void () PositionControl =
|
|||
exp = (exp+2)*(exp+2)+(exp*exp*exp*8); //is this enough?
|
||||
self.maxspeed = self.maxspeed / exp;
|
||||
}
|
||||
|
||||
if (self.equipment_slot)
|
||||
{
|
||||
if ((ToIID(ItemInSlot(self, self.equipment_slot))) == IID_EQUIP_SPRINTKIT)
|
||||
self.maxspeed = self.maxspeed*2;
|
||||
if ((ToIID(ItemInSlot(self, self.equipment_slot))) == IID_EQUIP_STEALTHBOY)
|
||||
self.maxspeed = self.maxspeed/2;
|
||||
}
|
||||
};
|
||||
|
||||
.float gravity;
|
||||
|
@ -1254,7 +1291,6 @@ void() PlayerPreThink =
|
|||
|
||||
Identify();
|
||||
PositionControl();
|
||||
SpeedControl();
|
||||
WeightControl();
|
||||
ArmorCheck();
|
||||
Crosshair();
|
||||
|
@ -1405,9 +1441,16 @@ void() PlayerPreThink =
|
|||
{
|
||||
self.gravity = 1;
|
||||
}
|
||||
self.attack_finished = time + 0.1;
|
||||
}
|
||||
if ((ToIID(ItemInSlot(self, self.equipment_slot))) == IID_EQUIP_HOVERBOOTS && self.button2)
|
||||
{
|
||||
if (self.attack_finished < time)
|
||||
{
|
||||
self.velocity = self.velocity + v_up*800*0.4;
|
||||
self.attack_finished = time + 0.4;
|
||||
}
|
||||
}
|
||||
else
|
||||
dprint("Bad equipment item\n");
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1424,6 +1467,10 @@ void() CheckPowerups =
|
|||
return;
|
||||
|
||||
// invisibility
|
||||
if (self.equipment_slot)
|
||||
if ((ToIID(ItemInSlot(self, self.equipment_slot))) == IID_EQUIP_STEALTHBOY)
|
||||
goto beinvis;
|
||||
|
||||
if (self.invisible_finished)
|
||||
{
|
||||
// sound and screen flash when items starts to run out
|
||||
|
@ -1453,16 +1500,19 @@ void() CheckPowerups =
|
|||
|
||||
if (self.invisible_finished < time)
|
||||
{ // just stopped
|
||||
self.items = self.items - IT_INVISIBILITY;
|
||||
self.invisible_finished = 0;
|
||||
self.invisible_time = 0;
|
||||
}
|
||||
|
||||
:beinvis
|
||||
self.items = self.items | IT_INVISIBILITY;
|
||||
// use the eyes
|
||||
self.frame = 0;
|
||||
self.modelindex = modelindex_eyes;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.items = self.items - (self.items & IT_INVISIBILITY);
|
||||
if (self.position <= 1)
|
||||
self.modelindex = modelindex_player;
|
||||
if (self.position == 2)
|
||||
|
@ -1475,6 +1525,7 @@ void() CheckPowerups =
|
|||
self.modelindex = modelindex_dead;
|
||||
if (self.ghost == 1 || self.class == 0 || self.team == 0)
|
||||
self.modelindex = modelindex_gone;
|
||||
}
|
||||
|
||||
|
||||
// invincibility
|
||||
|
|
|
@ -108,7 +108,9 @@ void(string arg1) Cmd_InvUse =
|
|||
iid == IID_BUILD_SHIELDGEN ||
|
||||
iid == IID_BUILD_AUTODOC ||
|
||||
iid == IID_BUILD_ROBOFANG ||
|
||||
iid == IID_BUILD_TESLA)
|
||||
iid == IID_BUILD_TTURRET ||
|
||||
iid == IID_BUILD_RTURRET ||
|
||||
iid == IID_BUILD_GTURRET)
|
||||
{
|
||||
if (spawn_station(iid))
|
||||
DecreaseDestroySlot(slotno);
|
||||
|
@ -129,6 +131,48 @@ void(string arg1) Cmd_InvUse =
|
|||
}
|
||||
return;
|
||||
}
|
||||
if (iid == IID_EQUIP_SPRINTKIT)
|
||||
{
|
||||
if (self.equipment_slot == slotno)
|
||||
{
|
||||
self.equipment_slot = 0;
|
||||
sprint(self, PRINT_HIGH, "What a downer\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
self.equipment_slot = slotno;
|
||||
sprint(self, PRINT_HIGH, "SUGAR RUSH!!!\n");
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (iid == IID_EQUIP_STEALTHBOY)
|
||||
{
|
||||
if (self.equipment_slot == slotno)
|
||||
{
|
||||
self.equipment_slot = 0;
|
||||
sprint(self, PRINT_HIGH, "stealthboy deactivated\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
self.equipment_slot = slotno;
|
||||
sprint(self, PRINT_HIGH, "stealthboy activated, fading into the shadows\n");
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (iid == IID_EQUIP_HOVERBOOTS)
|
||||
{
|
||||
if (self.equipment_slot == slotno)
|
||||
{
|
||||
self.equipment_slot = 0;
|
||||
sprint(self, PRINT_HIGH, "Hoverboots deactivated\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
self.equipment_slot = slotno;
|
||||
sprint(self, PRINT_HIGH, "Hoverboots activated\n");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
sprint(self, PRINT_HIGH, "Don't know how to 'use' item\n");
|
||||
};
|
||||
|
@ -193,6 +237,12 @@ void(string arg1, string arg2) Cmd_InvSwap =
|
|||
if (slotno1 == self.current_slot || slotno2 == self.current_slot)
|
||||
W_SetCurrentAmmo();
|
||||
|
||||
//swap the equipment_slot over too.
|
||||
if (self.equipment_slot == slotno1)
|
||||
self.equipment_slot = slotno2;
|
||||
else if (self.equipment_slot == slotno2)
|
||||
self.equipment_slot = slotno1;
|
||||
|
||||
self.rtime = time + 2; //we don't check this here though - cost to get into inventory.
|
||||
};
|
||||
|
||||
|
@ -206,6 +256,12 @@ void(string arg1, float iid, float num) Cmd_InvGive =
|
|||
return;
|
||||
}
|
||||
|
||||
if (!FitsInSlot(slotno, iid))
|
||||
{
|
||||
sprint(self, PRINT_MEDIUM, "Can't give that item in that slot\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (num <= 0)
|
||||
num = 1;
|
||||
SetItemSlot(self, slotno, SlotVal(iid, num));
|
||||
|
|
|
@ -213,7 +213,8 @@ void end_sys_fields; // flag for structure dumping
|
|||
//================================================
|
||||
|
||||
|
||||
|
||||
#define team team_no
|
||||
.float team_no;
|
||||
|
||||
|
||||
float parm17, parm18, parm18, parm19, parm20, parm21, parm22, parm23, parm24, parm25, parm26, parm27, parm28, parm29, parm30, parm31, parm32;
|
||||
|
|
|
@ -127,6 +127,9 @@ void () door_use =
|
|||
|
||||
void () door_trigger_touch =
|
||||
{
|
||||
if (!triggercantouch(self, other))
|
||||
return;
|
||||
|
||||
if ((other.health <= MULTICAST_ALL))
|
||||
{
|
||||
return;
|
||||
|
@ -205,6 +208,9 @@ void (entity portal, entity toucher) SpawnOpenDoor =
|
|||
|
||||
void () door_touch =
|
||||
{
|
||||
if (!triggercantouch(self, other))
|
||||
return;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
|
||||
|
@ -264,6 +270,7 @@ entity (vector fmins, vector fmaxs) spawn_field =
|
|||
local vector t2;
|
||||
|
||||
trigger = spawn ();
|
||||
trigger.team = self.team;
|
||||
trigger.movetype = MOVETYPE_NONE;
|
||||
trigger.solid = SOLID_TRIGGER;
|
||||
trigger.owner = self;
|
||||
|
@ -655,6 +662,8 @@ void () secret_blocked =
|
|||
|
||||
void () secret_touch =
|
||||
{
|
||||
if (!triggercantouch(self, other))
|
||||
return;
|
||||
if ((other.classname != "player"))
|
||||
{
|
||||
return;
|
||||
|
|
|
@ -80,11 +80,15 @@ float IID_BUILD_MRAMMO = 350;
|
|||
float IID_BUILD_SHIELDGEN = 351;
|
||||
float IID_BUILD_AUTODOC = 352;
|
||||
float IID_BUILD_ROBOFANG = 353;
|
||||
float IID_BUILD_TESLA = 354;
|
||||
//float IID_BUILD_TELEPAD = 355;
|
||||
float IID_BUILD_TTURRET = 354;
|
||||
float IID_BUILD_TELEPAD = 355;
|
||||
float IID_BUILD_RTURRET = 356;
|
||||
float IID_BUILD_GTURRET = 357;
|
||||
|
||||
float IID_EQUIP_CLIMBINGGEAR = 375;
|
||||
float IID_EQUIP_STEALTHBOY = 376;
|
||||
float IID_EQUIP_SPRINTKIT = 377;
|
||||
float IID_EQUIP_HOVERBOOTS = 378;
|
||||
|
||||
#define IsShootable(iid) (IsMelee(iid) || IsRanged(iid) || IsGrenade(iid))
|
||||
|
||||
|
@ -753,6 +757,12 @@ float(float iid) GetItemWeight =
|
|||
return 3;
|
||||
if (iid == IID_BUILD_ROBOFANG)
|
||||
return 2;
|
||||
if (iid == IID_BUILD_TTURRET)
|
||||
return 3;
|
||||
if (iid == IID_BUILD_GTURRET)
|
||||
return 3;
|
||||
if (iid == IID_BUILD_RTURRET)
|
||||
return 3;
|
||||
|
||||
|
||||
// bprint(PRINT_MEDIUM, ftos(iid), " without a weight!\n");
|
||||
|
@ -904,11 +914,21 @@ string(float iid) GetItemName =
|
|||
return "auto-doc";
|
||||
if (iid == IID_BUILD_ROBOFANG)
|
||||
return "robofang";
|
||||
if (iid == IID_BUILD_TTURRET)
|
||||
return "tesla turret";
|
||||
if (iid == IID_BUILD_RTURRET)
|
||||
return "rocket turret";
|
||||
if (iid == IID_BUILD_GTURRET)
|
||||
return "machine-gun turret";
|
||||
|
||||
if (iid == IID_EQUIP_CLIMBINGGEAR)
|
||||
return "climbing gear";
|
||||
if (iid == IID_EQUIP_STEALTHBOY)
|
||||
return "stealthboy";
|
||||
if (iid == IID_EQUIP_SPRINTKIT)
|
||||
return "lucozade sport!";
|
||||
if (iid == IID_EQUIP_HOVERBOOTS)
|
||||
return "hover boots";
|
||||
|
||||
bprint(PRINT_MEDIUM, ftos(iid), " without a name!\n");
|
||||
return strcat("unknown", ftos(iid));
|
||||
|
@ -1066,11 +1086,19 @@ string(float iid) GetItemImage =
|
|||
return "autodoc.jpg";
|
||||
if (iid == IID_BUILD_ROBOFANG)
|
||||
return "robofang.jpg";
|
||||
if (iid == IID_BUILD_TTURRET)
|
||||
return "tesla.jpg";
|
||||
if (iid == IID_BUILD_RTURRET)
|
||||
return "rturret.jpg";
|
||||
if (iid == IID_BUILD_GTURRET)
|
||||
return "gturret.jpg";
|
||||
|
||||
if (iid == IID_EQUIP_CLIMBINGGEAR)
|
||||
return "robofang.jpg";
|
||||
if (iid == IID_EQUIP_STEALTHBOY)
|
||||
return "stealthboy.jpg";
|
||||
if (iid == IID_EQUIP_SPRINTKIT)
|
||||
return "sprintkit.jpg";
|
||||
|
||||
bprint(PRINT_MEDIUM, ftos(iid), " without a name!\n");
|
||||
return strcat("unknown.jpg", ftos(iid));
|
||||
|
@ -1198,6 +1226,12 @@ float(string itname) ItemIDOfName =
|
|||
if (itname == "stealthboy")
|
||||
return IID_EQUIP_STEALTHBOY;
|
||||
|
||||
if (itname == "sprintkit")
|
||||
return IID_EQUIP_SPRINTKIT;
|
||||
|
||||
if (itname == "tesla")
|
||||
return IID_BUILD_TTURRET;
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
|
|
@ -279,11 +279,12 @@ float (entity to, float iid, float quant) TryGiveStackable =
|
|||
if (slot > 2)
|
||||
{
|
||||
item = ItemInSlot(to, slot);
|
||||
if (ToStatus(item) + quant > 100) //100 is our maxstack value here
|
||||
if (ToStatus(item) + quant > 500) //500 is our maxstack value here
|
||||
{
|
||||
quant = quant + ToStatus(item) - 100;
|
||||
SetItemSlot(to, slot, SlotVal(iid, 100));
|
||||
quant = quant + ToStatus(item) - 500;
|
||||
SetItemSlot(to, slot, SlotVal(iid, 500));
|
||||
slot = 0;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
quant = quant + ToStatus(item);
|
||||
|
@ -292,7 +293,7 @@ float (entity to, float iid, float quant) TryGiveStackable =
|
|||
return true;
|
||||
if (slot == 0)
|
||||
{
|
||||
slot = SlotOfItem(to, 0);
|
||||
slot = FindSuitableEmptySlot(to, iid);
|
||||
if (slot == 0)
|
||||
return false;
|
||||
}
|
||||
|
@ -304,6 +305,9 @@ float (entity to, float iid, float quant) TryGiveStackable =
|
|||
|
||||
void () health_touch =
|
||||
{
|
||||
if (!triggercantouch(self, other))
|
||||
return;
|
||||
|
||||
if (other.classname != "player" || other.ghost != 0)
|
||||
return;
|
||||
|
||||
|
@ -373,6 +377,9 @@ void() armor_touch;
|
|||
void() armor_touch =
|
||||
{
|
||||
local float type, value, bit;
|
||||
|
||||
if (!triggercantouch(self, other))
|
||||
return;
|
||||
|
||||
if (other.health <= 0)
|
||||
return;
|
||||
|
@ -564,6 +571,9 @@ void() weapon_touch =
|
|||
// For client weapon_switch
|
||||
local float w_switch;
|
||||
|
||||
if (!triggercantouch(self, other))
|
||||
return;
|
||||
|
||||
if (!(other.flags & FL_CLIENT))
|
||||
return;
|
||||
|
||||
|
@ -861,6 +871,9 @@ void() ammo_touch =
|
|||
local string ammoname, ammocountftos;
|
||||
local float best, ammotype, ammocount;
|
||||
|
||||
if (!triggercantouch(self, other))
|
||||
return;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
if (other.health <= 0)
|
||||
|
@ -1170,6 +1183,9 @@ KEYS
|
|||
|
||||
void() key_touch =
|
||||
{
|
||||
if (!triggercantouch(self, other))
|
||||
return;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
if (other.health <= 0)
|
||||
|
@ -1300,6 +1316,9 @@ END OF LEVEL RUNES
|
|||
|
||||
void() sigil_touch =
|
||||
{
|
||||
if (!triggercantouch(self, other))
|
||||
return;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
if (other.health <= 0)
|
||||
|
@ -1370,6 +1389,9 @@ void() powerup_touch;
|
|||
|
||||
void() powerup_touch =
|
||||
{
|
||||
if (!triggercantouch(self, other))
|
||||
return;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
if (other.health <= 0)
|
||||
|
|
|
@ -36,47 +36,123 @@ weaponry\n\n
|
|||
|
||||
string () ShopString =
|
||||
{
|
||||
return ("--- S H O P -------\n\n<EFBFBD>1‘ traits \n<EFBFBD>2‘ perks \n<EFBFBD>3‘ body armour \n<EFBFBD>4‘ protection \n<EFBFBD>5‘ weapons \n<EFBFBD>6‘ equipment \n<EFBFBD>7‘ chems \n<EFBFBD>8‘ special \n<EFBFBD>e‘ leave \n");
|
||||
return ("--- S H O P -------\n"
|
||||
"\n"
|
||||
"<EFBFBD>1‘ traits \n"
|
||||
"<EFBFBD>2‘ perks \n"
|
||||
"<EFBFBD>3‘ body armour \n"
|
||||
"<EFBFBD>4‘ protection \n"
|
||||
"<EFBFBD>5‘ weapons \n"
|
||||
"<EFBFBD>6‘ equipment \n"
|
||||
"<EFBFBD>7‘ chems \n"
|
||||
"<EFBFBD>8‘ special \n"
|
||||
"<EFBFBD>e‘ leave \n");
|
||||
};
|
||||
|
||||
string () WeaponString =
|
||||
{
|
||||
return ("weaponry\n\n<EFBFBD>1‘ melee \n<EFBFBD>2‘ thrown \n<EFBFBD>3‘ pistols&smgs \n<EFBFBD>4‘ shotguns \n<EFBFBD>5‘ rifles \n<EFBFBD>6‘ heavy guns \n<EFBFBD>e‘ leave \n");
|
||||
return ("weaponry\n"
|
||||
"\n"
|
||||
"<EFBFBD>1‘ melee \n"
|
||||
"<EFBFBD>2‘ thrown \n"
|
||||
"<EFBFBD>3‘ pistols&smgs \n"
|
||||
"<EFBFBD>4‘ shotguns \n"
|
||||
"<EFBFBD>5‘ rifles \n"
|
||||
"<EFBFBD>6‘ heavy guns \n"
|
||||
"<EFBFBD>e‘ leave \n");
|
||||
};
|
||||
|
||||
string () TraitString =
|
||||
{
|
||||
return ("traits\n\n<EFBFBD>1‘ one handed \n<EFBFBD>2‘ small frame \n<EFBFBD>3‘ bruiser \n<EFBFBD>4‘ heavy handed \n<EFBFBD>5‘ bloody mess \n<EFBFBD>6‘ bad luck \n<EFBFBD>e‘ leave \n");
|
||||
return ("traits\n"
|
||||
"\n"
|
||||
"<EFBFBD>1‘ one handed \n"
|
||||
"<EFBFBD>2‘ small frame \n"
|
||||
"<EFBFBD>3‘ bruiser \n"
|
||||
"<EFBFBD>4‘ heavy handed \n"
|
||||
"<EFBFBD>5‘ bloody mess \n"
|
||||
"<EFBFBD>6‘ bad luck \n"
|
||||
"<EFBFBD>e‘ leave \n");
|
||||
};
|
||||
|
||||
string () ThrownString =
|
||||
{
|
||||
return ("grenades\n GRENADE | COST \n\n<EFBFBD>1‘ smoke grenade 3$\n<EFBFBD>2‘ frag grenade 4$\n<EFBFBD>3‘ emp grenade 5$\n<EFBFBD>4‘ flashbang 7$\n<EFBFBD>e‘ exit \n");
|
||||
return ("grenades\n"
|
||||
" GRENADE | COST \n"
|
||||
"\n"
|
||||
"<EFBFBD>1‘ smoke grenade 3$\n"
|
||||
"<EFBFBD>2‘ frag grenade 4$\n"
|
||||
"<EFBFBD>3‘ emp grenade 5$\n"
|
||||
"<EFBFBD>4‘ flashbang 7$\n"
|
||||
"<EFBFBD>e‘ exit \n");
|
||||
};
|
||||
|
||||
string () BuildString =
|
||||
{
|
||||
return ("BUILD A STRUCTURE\n NAME | UPGRADE | SCRAPS\n\n<EFBFBD>1‘ Mr. Ammo 4\n<EFBFBD>2‘ Barricade 6\n<EFBFBD>3‘ AutoDoc(tm) 10\n<EFBFBD>4‘ Robo-Fang 11\n<EFBFBD>e‘ exit \n");
|
||||
return ("BUILD A STRUCTURE\n"
|
||||
" NAME | UPGRADE | SCRAPS\n"
|
||||
"\n"
|
||||
"<EFBFBD>1‘ Mr. Ammo 4\n"
|
||||
"<EFBFBD>2‘ Barricade 6\n"
|
||||
"<EFBFBD>3‘ AutoDoc(tm) 10\n"
|
||||
"<EFBFBD>4‘ Robo-Fang 11\n"
|
||||
"<EFBFBD>e‘ exit \n");
|
||||
};
|
||||
|
||||
string () HelmetString =
|
||||
{
|
||||
return ("helmets\nprotect you from headshots so\nmake sure you use a decent one\n\n ABS% WT DEFLECT PRC\n<EFBFBD>1‘ combat helm -10% 01 5% 05\n<EFBFBD>2‘ combat helm 2 +0% 02 5% 20\n<EFBFBD>3‘ heavy-duty +20% 03 5% 20\n<EFBFBD>4‘ ceramic helm -20% ...");
|
||||
return ("helmets\n"
|
||||
"protect you from headshots so\n"
|
||||
"make sure you use a decent one\n"
|
||||
"\n"
|
||||
" ABS% WT DEFLECT PRC\n"
|
||||
"<EFBFBD>1‘ combat helm -10% 01 5% 05\n"
|
||||
"<EFBFBD>2‘ combat helm 2 +0% 02 5% 20\n"
|
||||
"<EFBFBD>3‘ heavy-duty +20% 03 5% 20\n"
|
||||
"<EFBFBD>4‘ ceramic helm -20% ...");
|
||||
};
|
||||
|
||||
string () ArmorString =
|
||||
{
|
||||
return ("body armour wt abs prc\n\n<EFBFBD>1‘ light kevlar 03 1/20% 03$\n<EFBFBD>2‘ leather armor 05 2/30% 08$\n<EFBFBD>3‘ kevlar armor 09 3/35% 10$\n<EFBFBD>4‘ metal armor 15 5/35% 12$\n<EFBFBD>5‘ combat armor 12 4/40% 25$\n<EFBFBD>6‘ brotherhood armor 17 5/45% 35$\n<EFBFBD>7‘ force armor 06 7/10% 45$\n<EFBFBD>8‘ metal armor mkii 20 8/50% 55$\n");
|
||||
return ("body armour wt abs prc\n"
|
||||
"\n"
|
||||
"<EFBFBD>1‘ light kevlar 03 1/20% 03$\n"
|
||||
"<EFBFBD>2‘ leather armor 05 2/30% 08$\n"
|
||||
"<EFBFBD>3‘ kevlar armor 09 3/35% 10$\n"
|
||||
"<EFBFBD>4‘ metal armor 15 5/35% 12$\n"
|
||||
"<EFBFBD>5‘ combat armor 12 4/40% 25$\n"
|
||||
"<EFBFBD>6‘ brotherhood armor 17 5/45% 35$\n"
|
||||
"<EFBFBD>7‘ force armor 06 7/10% 45$\n"
|
||||
"<EFBFBD>8‘ metal armor mkii 20 8/50% 55$\n");
|
||||
};
|
||||
|
||||
string () PerkString =
|
||||
{
|
||||
return ("perks\n ABILITY | FRAGS NEEDED \n\n<EFBFBD>1‘ bonus movement 2\n<EFBFBD>2‘ strong back 2\n<EFBFBD>3‘ quick pockets 2\n<EFBFBD>4‘ awareness 2\n<EFBFBD>5‘ silent running 3\n<EFBFBD>6‘ better criticals 3\n<EFBFBD>7‘ bonus ranged damage 3\n<EFBFBD>8‘ divine favor 3\n<EFBFBD>9‘ slayer 3\n<EFBFBD>0‘ sharpshooter 4\n");
|
||||
return ("perks\n"
|
||||
" ABILITY | FRAGS NEEDED \n"
|
||||
"\n"
|
||||
"<EFBFBD>1‘ bonus movement 2\n"
|
||||
"<EFBFBD>2‘ strong back 2\n"
|
||||
"<EFBFBD>3‘ quick pockets 2\n"
|
||||
"<EFBFBD>4‘ awareness 2\n"
|
||||
"<EFBFBD>5‘ silent running 3\n"
|
||||
"<EFBFBD>6‘ better criticals 3\n"
|
||||
"<EFBFBD>7‘ bonus ranged damage 3\n"
|
||||
"<EFBFBD>8‘ divine favor 3\n"
|
||||
"<EFBFBD>9‘ slayer 3\n"
|
||||
"<EFBFBD>0‘ sharpshooter 4\n");
|
||||
};
|
||||
|
||||
string () ProtectString =
|
||||
{
|
||||
return ("++ high-tech protective devices ++ \n\n HARDWARE | SHIELDS VS | PRICE \n<EFBFBD>1‘ energy amulet |damage: 7% <20>15‘\n<EFBFBD>2‘ force field |front: 15% <20>20‘\n<EFBFBD>3‘ safety ring |absorb: 3 <20>35‘\n<EFBFBD>4‘ smokescreen |obscures <20>40‘\n<EFBFBD>5‘ sentient cube |regenerate <20>45‘\n");
|
||||
return ("++ high-tech protective devices ++ \n"
|
||||
"\n"
|
||||
" HARDWARE | SHIELDS VS | PRICE \n"
|
||||
"<EFBFBD>1‘ energy amulet |damage: 7% <20>15‘\n"
|
||||
"<EFBFBD>2‘ force field |front: 15% <20>20‘\n"
|
||||
"<EFBFBD>3‘ safety ring |absorb: 3 <20>35‘\n"
|
||||
"<EFBFBD>4‘ smokescreen |obscures <20>40‘\n"
|
||||
"<EFBFBD>5‘ sentient cube |regenerate <20>45‘\n");
|
||||
};
|
||||
|
||||
|
||||
|
@ -97,17 +173,24 @@ string () OtherString =
|
|||
"\n"
|
||||
"\n"
|
||||
"<EFBFBD>1‘ (25) bandages for medic 2$\n"
|
||||
"<EFBFBD>2‘ (5) metal scraps 5$\n"
|
||||
"<EFBFBD>3‘ (20) mr.ammo! 20$\n"
|
||||
"<EFBFBD>4‘ (20) auto-doc! 20$\n"
|
||||
"<EFBFBD>5‘ (20) shield-gen! 20$\n"
|
||||
"<EFBFBD>3‘ (20) mr.ammo 20$\n"
|
||||
"<EFBFBD>4‘ (20) auto-doc 20$\n"
|
||||
"<EFBFBD>5‘ (20) shield-gen 20$\n"
|
||||
"<EFBFBD>6‘ (20) tesla-turret 20$\n"
|
||||
;
|
||||
};
|
||||
|
||||
|
||||
string () MeleeString =
|
||||
{
|
||||
return ("MELEE WEAPONS\nWEAPON | TYPE | WT | PRICE \n\n<EFBFBD>1‘ knife melee 01 01$\n<EFBFBD>2‘ hand axe melee 08 03$\n<EFBFBD>3‘ vibroblade melee 04 10$\n<EFBFBD>4‘ power axe melee 07 15$\n<EFBFBD>e‘ exit \n");
|
||||
return ("MELEE WEAPONS\n"
|
||||
"WEAPON | TYPE | WT | PRICE \n"
|
||||
"\n"
|
||||
"<EFBFBD>1‘ knife melee 01 01$\n"
|
||||
"<EFBFBD>2‘ hand axe melee 08 03$\n"
|
||||
"<EFBFBD>3‘ vibroblade melee 04 10$\n"
|
||||
"<EFBFBD>4‘ power axe melee 07 15$\n"
|
||||
"<EFBFBD>e‘ exit \n");
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -123,12 +206,26 @@ string () MeleeString =
|
|||
|
||||
string () PistolString =
|
||||
{
|
||||
return ("Pistols and Submachineguns\n WEAPON | CAL | WEIGHT | PRICE \n\n<EFBFBD>1‘ mk23 socom .45 01 5$\n<EFBFBD>2‘ d. eagle .44 02 7$\n<EFBFBD>3‘ needler pistol 02 9$\n<EFBFBD>4‘ h&k mp7 4mm 03 14$\n<EFBFBD>5‘ grease gun 9mm 03 17$\n<EFBFBD>6‘ alien blaster 02 21$\n");
|
||||
return ("Pistols and Submachineguns\n"
|
||||
" WEAPON | CAL | WEIGHT | PRICE \n"
|
||||
"\n"
|
||||
"<EFBFBD>1‘ mk23 socom .45 01 5$\n"
|
||||
"<EFBFBD>2‘ d. eagle .44 02 7$\n"
|
||||
"<EFBFBD>3‘ needler pistol 02 9$\n"
|
||||
"<EFBFBD>4‘ h&k mp7 4mm 03 14$\n"
|
||||
"<EFBFBD>5‘ grease gun 9mm 03 17$\n"
|
||||
"<EFBFBD>6‘ alien blaster 02 21$\n");
|
||||
};
|
||||
|
||||
string () ShotgunString =
|
||||
{
|
||||
return ("shotguns\n WEAPON | TYPE | WEIGHT | PRICE \n\n<EFBFBD>1‘ pipe rifle .44 02 4$\n<EFBFBD>2‘ winchester 12g 03 8$\n<EFBFBD>3‘ mossberg 12g 04 14$\n<EFBFBD>4‘ citykiller 12g 05 35$\n");
|
||||
return ("shotguns\n"
|
||||
" WEAPON | TYPE | WEIGHT | PRICE \n"
|
||||
"\n"
|
||||
"<EFBFBD>1‘ pipe rifle .44 02 4$\n"
|
||||
"<EFBFBD>2‘ winchester 12g 03 8$\n"
|
||||
"<EFBFBD>3‘ mossberg 12g 04 14$\n"
|
||||
"<EFBFBD>4‘ citykiller 12g 05 35$\n");
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -141,18 +238,33 @@ string () ShotgunString =
|
|||
*/
|
||||
string () RifleString =
|
||||
{
|
||||
return ("rifles\n RIFLE | TYPE | WEIGHT | PRICE \n\n<EFBFBD>1‘ rangemaster 7mm 03 11$\n<EFBFBD>2‘ ak-112 5mm 04 21$\n<EFBFBD>3‘ remington .308 05 24$\n<EFBFBD>4‘ ak-74 5mm 04 27$\n<EFBFBD>5‘ moonlight .223 05 36$\n<EFBFBD>6‘ sa-80 5mm 05 32$\n<EFBFBD>7‘ fn-fal .308 09 25$\n");
|
||||
return ("rifles\n"
|
||||
" RIFLE | TYPE | WEIGHT | PRICE \n"
|
||||
"\n"
|
||||
"<EFBFBD>1‘ rangemaster 7mm 03 11$\n"
|
||||
"<EFBFBD>2‘ ak-112 5mm 04 21$\n"
|
||||
"<EFBFBD>3‘ remington .308 05 24$\n"
|
||||
"<EFBFBD>4‘ ak-74 5mm 04 27$\n"
|
||||
"<EFBFBD>5‘ moonlight .223 05 36$\n"
|
||||
"<EFBFBD>6‘ sa-80 5mm 05 32$\n"
|
||||
"<EFBFBD>7‘ fn-fal .308 09 25$\n");
|
||||
};
|
||||
|
||||
string () HeavyString =
|
||||
{
|
||||
return ("other weaponry\n WEAPON | TYPE | WEIGHT | PRICE \n\n<EFBFBD>1‘ rocket launcher 10 30$\n<EFBFBD>2‘ gauss rifle 07 32$\n<EFBFBD>3‘ laser carbine 12 45$\n");
|
||||
return ("other weaponry\n"
|
||||
" WEAPON | TYPE | WEIGHT | PRICE \n"
|
||||
"\n"
|
||||
"<EFBFBD>1‘ rocket launcher 10 30$\n"
|
||||
"<EFBFBD>2‘ gauss rifle 07 32$\n"
|
||||
"<EFBFBD>3‘ laser carbine 12 45$\n");
|
||||
};
|
||||
|
||||
string () ChemString =
|
||||
{
|
||||
return ("drugs\n DRUG | EFFECTS | PRICE\n"
|
||||
"\n<EFBFBD>1‘ stimpack heals 05+20 3$\n"
|
||||
"\n"
|
||||
"<EFBFBD>1‘ stimpack heals 05+20 3$\n"
|
||||
"<EFBFBD>2‘ medkit+ heals 10+50 5$\n"
|
||||
"<EFBFBD>3‘ superstim* heals 20+60 12$\n"
|
||||
"<EFBFBD>4‘ adrenaline*+speed/jump 10$\n"
|
||||
|
@ -166,7 +278,8 @@ string () ChemString =
|
|||
string () ChemString2 =
|
||||
{
|
||||
return ("chems\n DRUG | EFFECTS | PRICE\n"
|
||||
"\n<EFBFBD>1‘ adrenaline +60 speed/jump 3$\n"
|
||||
"\n"
|
||||
"<EFBFBD>1‘ adrenaline +60 speed/jump 3$\n"
|
||||
"<EFBFBD>2‘ stimpack heals 40 5$\n"
|
||||
"<EFBFBD>3‘ psycho+ +60 hp/no pain 11$\n"
|
||||
"<EFBFBD>4‘ medkit* heals 20+50 12$\n"
|
||||
|
@ -180,19 +293,44 @@ string () ChemString2 =
|
|||
|
||||
string () EnergyWeaponsString =
|
||||
{
|
||||
return ("high-tech weaponry\n WEAPON | TYPE | WEIGHT | PRICE \n\n<EFBFBD>1‘ [*] flash gun semi 03 21$\n<EFBFBD>2‘ [&] plasma rifle semi 08 34$\n<EFBFBD>3‘ [*] laser rifle semi 11 40$\n<EFBFBD>4‘ [*] laser carbine auto 06 57$\n<EFBFBD>5‘ [?] alien blaster semi 02 72$\n");
|
||||
return ("high-tech weaponry\n"
|
||||
" WEAPON | TYPE | WEIGHT | PRICE \n"
|
||||
"\n"
|
||||
"<EFBFBD>1‘ [*] flash gun semi 03 21$\n"
|
||||
"<EFBFBD>2‘ [&] plasma rifle semi 08 34$\n"
|
||||
"<EFBFBD>3‘ [*] laser rifle semi 11 40$\n"
|
||||
"<EFBFBD>4‘ [*] laser carbine auto 06 57$\n"
|
||||
"<EFBFBD>5‘ [?] alien blaster semi 02 72$\n");
|
||||
};
|
||||
|
||||
//<2F>6‘ bozar 14 81$\n<>7‘ firestorm 12 97$
|
||||
|
||||
string () HeavyGunsString =
|
||||
{
|
||||
return ("heavy guns\n WEAPON | TYPE | WEIGHT | PRICE \n\n<EFBFBD>1‘ light support weapon 15 55$\n<EFBFBD>2‘ rocket launcher 11 75$\n<EFBFBD>3‘ 50oc flamethrower 16 35$\n<EFBFBD>4‘ steyr amr .50 flechette 17 72$\n<EFBFBD>5‘ m72 gauss rifle 2mm 12 81$\n<EFBFBD>6‘ bozar 14 81$\n<EFBFBD>7‘ firestorm 12 97$");
|
||||
return ("heavy guns\n"
|
||||
" WEAPON | TYPE | WEIGHT | PRICE \n"
|
||||
"\n"
|
||||
"<EFBFBD>1‘ light support weapon 15 55$\n"
|
||||
"<EFBFBD>2‘ rocket launcher 11 75$\n"
|
||||
"<EFBFBD>3‘ 50oc flamethrower 16 35$\n"
|
||||
"<EFBFBD>4‘ steyr amr .50 flechette 17 72$\n"
|
||||
"<EFBFBD>5‘ m72 gauss rifle 2mm 12 81$\n"
|
||||
"<EFBFBD>6‘ bozar 14 81$\n"
|
||||
"<EFBFBD>7‘ firestorm 12 97$");
|
||||
};
|
||||
|
||||
string () de_dust =
|
||||
{
|
||||
return (" DE_DUST \n (BOMB/DEFUSE MAP) \n\nrangers have obtained two ufos\nthat have crash landed in the \ndesert. raiders must blow them\nup with c4 before its too late\n\n(activate electronic tools and\nc4 by pressing 4) ...");
|
||||
return (" DE_DUST \n"
|
||||
" (BOMB/DEFUSE MAP) \n"
|
||||
"\n"
|
||||
"rangers have obtained two ufos\n"
|
||||
"that have crash landed in the \n"
|
||||
"desert. raiders must blow them\n"
|
||||
"up with c4 before its too late\n"
|
||||
"\n"
|
||||
"(activate electronic tools and\n"
|
||||
"c4 by pressing 4) ...");
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -209,5 +347,17 @@ string () de_dust =
|
|||
|
||||
string () EquipmentString =
|
||||
{
|
||||
return ("+ special equipment +\npress your c key to activate!\n\n<EFBFBD>1‘ medic's bag <20>15c‘\n<EFBFBD>2‘ security alarm <20>15c‘\n<EFBFBD>3‘ remote camera <20>15c‘\n<EFBFBD>4‘ belt pouch <20>15c‘\n<EFBFBD>5‘ backpack <20>15c‘\n<EFBFBD>6‘ toolkit mark ii <20>15c‘\n<EFBFBD>7‘ climbing gear <20>15c‘\n<EFBFBD>8‘ enhanced battery <20>15c‘\n<EFBFBD>9‘ stealth boy <20>45c‘\n\n");
|
||||
return ("+ special equipment +\n"
|
||||
"press your c key to activate!\n"
|
||||
"\n"
|
||||
"<EFBFBD>1‘ medic's bag <20>15c‘\n"
|
||||
"<EFBFBD>2‘ security alarm <20>15c‘\n"
|
||||
"<EFBFBD>3‘ remote camera <20>15c‘\n"
|
||||
"<EFBFBD>4‘ belt pouch <20>15c‘\n"
|
||||
"<EFBFBD>5‘ backpack <20>15c‘\n"
|
||||
"<EFBFBD>6‘ toolkit mark ii <20>15c‘\n"
|
||||
"<EFBFBD>7‘ climbing gear <20>15c‘\n"
|
||||
"<EFBFBD>8‘ enhanced battery <20>15c‘\n"
|
||||
"<EFBFBD>9‘ stealth boy <20>45c‘\n"
|
||||
"\n");
|
||||
};
|
||||
|
|
|
@ -670,6 +670,8 @@ void() W_PlayerMenu =
|
|||
BuyStackable(20, IID_BUILD_AUTODOC);
|
||||
if (self.impulse == 5)
|
||||
BuyStackable(20, IID_BUILD_SHIELDGEN);
|
||||
if (self.impulse == 6)
|
||||
BuyStackable(20, IID_BUILD_TTURRET);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
|
||||
void() plat_center_touch;
|
||||
void() plat_outside_touch;
|
||||
//void() plat_outside_touch;
|
||||
void() plat_trigger_use;
|
||||
void() plat_go_up;
|
||||
void() plat_go_down;
|
||||
|
@ -18,6 +18,7 @@ void() plat_spawn_inside_trigger =
|
|||
//
|
||||
trigger = spawn();
|
||||
trigger.touch = plat_center_touch;
|
||||
trigger.team = self.team;
|
||||
trigger.movetype = MOVETYPE_NONE;
|
||||
trigger.solid = SOLID_TRIGGER;
|
||||
trigger.enemy = self;
|
||||
|
@ -72,6 +73,9 @@ void() plat_go_up =
|
|||
|
||||
void() plat_center_touch =
|
||||
{
|
||||
if (!triggercantouch(self, other))
|
||||
return;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
|
||||
|
@ -84,9 +88,12 @@ void() plat_center_touch =
|
|||
else if (self.state == STATE_TOP)
|
||||
self.nextthink = self.ltime + 1; // delay going down
|
||||
};
|
||||
|
||||
/*
|
||||
void() plat_outside_touch =
|
||||
{
|
||||
if (!triggercantouch(self, other))
|
||||
return;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
|
||||
|
@ -98,7 +105,7 @@ void() plat_outside_touch =
|
|||
if (self.state == STATE_TOP)
|
||||
plat_go_down ();
|
||||
};
|
||||
|
||||
*/
|
||||
void() plat_trigger_use =
|
||||
{
|
||||
if (self.think)
|
||||
|
|
|
@ -5,7 +5,7 @@ inventory.qc
|
|||
subs.qc
|
||||
fight.qc
|
||||
|
||||
//tf.qc
|
||||
tf.qc
|
||||
|
||||
ai.qc
|
||||
combat.qc
|
||||
|
|
|
@ -68,6 +68,9 @@ void() multi_trigger =
|
|||
|
||||
void() multi_killed =
|
||||
{
|
||||
if (!triggercantouch(self, other))
|
||||
return;
|
||||
|
||||
self.enemy = damage_attacker;
|
||||
multi_trigger();
|
||||
};
|
||||
|
@ -80,6 +83,9 @@ void() multi_use =
|
|||
|
||||
void() multi_touch =
|
||||
{
|
||||
if (!triggercantouch(self, other))
|
||||
return;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
|
||||
|
@ -376,6 +382,9 @@ void() teleport_touch =
|
|||
local entity t;
|
||||
local vector org;
|
||||
|
||||
if (!triggercantouch(self, other))
|
||||
return;
|
||||
|
||||
if (self.targetname)
|
||||
{
|
||||
if (self.nextthink < time)
|
||||
|
@ -490,6 +499,9 @@ trigger_setskill
|
|||
|
||||
void() trigger_skill_touch =
|
||||
{
|
||||
if (!triggercantouch(self, other))
|
||||
return;
|
||||
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
|
||||
|
@ -517,6 +529,8 @@ ONLY REGISTERED TRIGGERS
|
|||
|
||||
void() trigger_onlyregistered_touch =
|
||||
{
|
||||
if (!triggercantouch(self, other))
|
||||
return;
|
||||
if (other.classname != "player")
|
||||
return;
|
||||
if (self.attack_finished > time)
|
||||
|
@ -559,6 +573,9 @@ void() hurt_on =
|
|||
|
||||
void() hurt_touch =
|
||||
{
|
||||
if (self.team && self.team != other.team)
|
||||
return;
|
||||
|
||||
if (other.takedamage)
|
||||
{
|
||||
self.solid = SOLID_NOT;
|
||||
|
@ -593,15 +610,17 @@ void() trigger_push_touch =
|
|||
other.velocity = self.speed * self.movedir * 10;
|
||||
else if (other.health > 0)
|
||||
{
|
||||
other.velocity = self.speed * self.movedir * 10;
|
||||
if (other.classname == "player")
|
||||
{
|
||||
if (!triggercantouch(self, other))
|
||||
return;
|
||||
if (other.fly_sound < time)
|
||||
{
|
||||
other.fly_sound = time + 1.5;
|
||||
sound (other, CHAN_AUTO, "ambience/windfly.wav", 1, ATTN_NORM);
|
||||
}
|
||||
}
|
||||
other.velocity = self.speed * self.movedir * 10;
|
||||
}
|
||||
if (self.spawnflags & PUSH_ONCE)
|
||||
remove(self);
|
||||
|
|
|
@ -77,6 +77,154 @@ void() tesla_think =
|
|||
self.frame = 0;
|
||||
};
|
||||
|
||||
void (float tmp, float dam) turret_mg_fire =
|
||||
{
|
||||
local vector src;
|
||||
local vector dir;
|
||||
local vector direction;
|
||||
local entity en;
|
||||
local vector org;
|
||||
|
||||
makevectors (self.angles);
|
||||
|
||||
sound (self, CHAN_WEAPON, "weapons/1911.wav", PLAT_LOW_TRIGGER, ATTN_NORM);
|
||||
|
||||
src = self.origin + v_forward*10;
|
||||
src_z = self.absmin_z + self.size_z * 0.7;
|
||||
|
||||
en = self.enemy;
|
||||
|
||||
dir = en.origin - en.velocity*0.2;
|
||||
dir = normalize (dir - self.origin);
|
||||
|
||||
direction = dir;
|
||||
|
||||
traceline (src, src + direction*2048 + v_right*crandom()*tmp + v_up*crandom()*tmp, FALSE, self);
|
||||
|
||||
if (trace_fraction == PLAT_LOW_TRIGGER)
|
||||
return;
|
||||
|
||||
if (trace_ent.takedamage)
|
||||
{
|
||||
dam = 1 + random()*dam + random()*dam;
|
||||
dam = dam * (1 - (trace_fraction/2));
|
||||
SpawnBlood (org, PLAT_LOW_TRIGGER);
|
||||
T_Damage (trace_ent, self, self, dam);
|
||||
}
|
||||
else
|
||||
{
|
||||
WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
|
||||
WriteByte (MSG_MULTICAST, TE_SPIKE);
|
||||
WriteCoord (MSG_MULTICAST, trace_endpos_x);
|
||||
WriteCoord (MSG_MULTICAST, trace_endpos_y);
|
||||
WriteCoord (MSG_MULTICAST, trace_endpos_z);
|
||||
multicast (trace_endpos, MULTICAST_PVS);
|
||||
}
|
||||
|
||||
muzzleflash();
|
||||
};
|
||||
|
||||
void() GunTop_Think =
|
||||
{
|
||||
local entity e;
|
||||
local vector org;
|
||||
local float delta;
|
||||
|
||||
self.nextthink = time + 0.1;
|
||||
|
||||
if (self.owner.health < 1)
|
||||
{
|
||||
remove(self);
|
||||
return;
|
||||
}
|
||||
|
||||
setorigin(self, self.owner.origin);
|
||||
|
||||
if (!self.owner.aflag)
|
||||
{
|
||||
if (self.attack_finished < time)
|
||||
if (!self.enemy || self.enemy.health < 1)
|
||||
{
|
||||
e = findradius(self.origin, 800);
|
||||
while (e != world)
|
||||
{
|
||||
if (e.health > 0)
|
||||
{
|
||||
if (e.team != self.owner.team)
|
||||
{
|
||||
if (e.solid)
|
||||
{
|
||||
if (e.takedamage)
|
||||
{
|
||||
traceline (self.origin+'0 0 16', e.origin, FALSE, self);
|
||||
if (trace_ent == e)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
e = e.chain;
|
||||
}
|
||||
self.enemy = e;
|
||||
if (e == world)
|
||||
self.attack_finished = time + 0.3;
|
||||
|
||||
}
|
||||
if (self.enemy)
|
||||
{
|
||||
self.ideal_yaw = vectoyaw(self.enemy.origin - self.origin);
|
||||
ChangeYaw();
|
||||
if (self.attack_finished < time)
|
||||
{
|
||||
delta = anglemod(self.angles_y - self.ideal_yaw);
|
||||
if (delta > 10 && delta < 350)
|
||||
return;
|
||||
|
||||
traceline (self.owner.origin+'0 0 16', self.enemy.origin, FALSE, self.owner);
|
||||
if (trace_ent != self.enemy)
|
||||
{
|
||||
self.enemy = world;
|
||||
return;
|
||||
}
|
||||
|
||||
if (self.owner.buildtype == IID_BUILD_RTURRET)
|
||||
{
|
||||
sound (self, CHAN_WEAPON, "weapons/sgun1.wav", 1, ATTN_NORM);
|
||||
self.attack_finished = time + 0.7;
|
||||
newmis = spawn ();
|
||||
newmis.owner = self.owner;
|
||||
newmis.movetype = MOVETYPE_FLYMISSILE;
|
||||
newmis.solid = SOLID_BBOX;
|
||||
|
||||
// set newmis speed
|
||||
newmis.velocity = normalize(self.enemy.origin - self.origin)*1000;
|
||||
newmis.angles = vectoangles(newmis.velocity);
|
||||
|
||||
newmis.touch = T_MissileTouch;
|
||||
newmis.voided = 0;
|
||||
|
||||
// set newmis duration
|
||||
newmis.nextthink = time + 5;
|
||||
newmis.think = SUB_Remove;
|
||||
newmis.classname = "rocket";
|
||||
|
||||
setmodel (newmis, "progs/missile.mdl");
|
||||
setsize (newmis, '0 0 0', '0 0 0');
|
||||
setorigin (newmis, self.origin + v_forward*8 + '0 0 16');
|
||||
}
|
||||
if (self.owner.buildtype == IID_BUILD_GTURRET)
|
||||
{
|
||||
turret_mg_fire(0.4, 3+random()*4);
|
||||
self.attack_finished = time + 0.05;
|
||||
self.nextthink = time + 0.05;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void() FinishTesla =
|
||||
{
|
||||
self.netname = "tesla turret";
|
||||
|
@ -85,3 +233,32 @@ void() FinishTesla =
|
|||
setsize (self, '-16 -16 -24', '16 16 32');
|
||||
self.nextthink = time + 0.1;
|
||||
};
|
||||
void() FinishGunPost =
|
||||
{
|
||||
local entity top;
|
||||
|
||||
top = spawn();
|
||||
top.owner = self;
|
||||
top.think = GunTop_Think;
|
||||
top.nextthink = time + 0.1;
|
||||
top.yaw_speed = 20;
|
||||
if (self.buildtype == IID_BUILD_RTURRET)
|
||||
{
|
||||
setmodel(top, "progs/turrgun.mdl");
|
||||
setmodel(self, "progs/turrbase.mdl");
|
||||
}
|
||||
else
|
||||
{
|
||||
setmodel(top, "progs/miniturr.mdl");
|
||||
setmodel(self, "progs/minibase.mdl");
|
||||
}
|
||||
setorigin(top, self.origin);
|
||||
top.angles = self.angles;
|
||||
};
|
||||
void() FinishTurret =
|
||||
{
|
||||
if (self.buildtype == IID_BUILD_TTURRET)
|
||||
FinishTesla();
|
||||
else
|
||||
FinishGunPost();
|
||||
};
|
|
@ -31,6 +31,7 @@ void() autofire_s;
|
|||
float(float iid) UseBoostingChem;
|
||||
float(float iid) UseHealingChem;
|
||||
float(float slotno) DecreaseDestroySlot;
|
||||
void () DropAmmo;
|
||||
|
||||
#define weightx() (self.weight)
|
||||
|
||||
|
@ -403,8 +404,8 @@ W_FireRocket
|
|||
*/
|
||||
void() W_FireRocket =
|
||||
{
|
||||
if (deathmatch != 4)
|
||||
self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
|
||||
DropAmmo ();
|
||||
self.attack_finished = time + 0.7;
|
||||
|
||||
sound (self, CHAN_WEAPON, "weapons/sgun1.wav", 1, ATTN_NORM);
|
||||
|
||||
|
@ -2407,13 +2408,6 @@ void () WeaponTouch =
|
|||
if (other.ghost != 0)
|
||||
return;
|
||||
|
||||
if (other.current_slot == WEAPON_SPIKES)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (other.current_slot == AS_MELEE)
|
||||
return;
|
||||
|
||||
if (ItemInSlot(other, other.current_slot) == 0 && FitsInSlot(other.current_slot, ToIID(self.islot1)))
|
||||
slotnum = other.current_slot;
|
||||
if (!slotnum)
|
||||
|
@ -2424,6 +2418,10 @@ void () WeaponTouch =
|
|||
sound (other, CHAN_BODY, "misc/item1.wav", 1, ATTN_NORM);
|
||||
|
||||
SetItemSlot(other, slotnum, self.islot1);
|
||||
|
||||
sprint(other, PRINT_MEDIUM, "You pick up the ");
|
||||
sprint(other, PRINT_MEDIUM, GetItemName(ToIID(self.islot1)));
|
||||
sprint(other, PRINT_MEDIUM, "\n");
|
||||
remove (self);
|
||||
|
||||
self = other;
|
||||
|
@ -2458,6 +2456,7 @@ void (float slotnum, float snd, float force) DropFromSlot =
|
|||
newmis.classname = "dropped_weapon";
|
||||
newmis.movetype = MOVETYPE_TOSS;
|
||||
newmis.solid = SOLID_TRIGGER;
|
||||
newmis.flags = FL_ITEM; //item makes it bigger to player touches.
|
||||
newmis.velocity = aim (self, 500);
|
||||
newmis.velocity = (newmis.velocity * 500);
|
||||
newmis.angles_y = (random () * 360);
|
||||
|
@ -2484,6 +2483,10 @@ void (float slotnum, float snd, float force) DropFromSlot =
|
|||
|
||||
if (self.current_slot == slotnum)
|
||||
SetWeaponModel ();
|
||||
|
||||
if (self.equipment_slot == slotnum)
|
||||
self.equipment_slot = 0;
|
||||
|
||||
};
|
||||
|
||||
void (float slot) WeaponAmmo =
|
||||
|
@ -3239,7 +3242,7 @@ void (entity guy) spawn_dot =
|
|||
hologram.nextthink = (time + 0.01);
|
||||
};
|
||||
|
||||
void() FinishTesla;
|
||||
void() FinishTurret;
|
||||
float (float iid) spawn_station =
|
||||
{
|
||||
local entity oself;
|
||||
|
@ -3386,9 +3389,9 @@ float (float iid) spawn_station =
|
|||
self.netname = "robofang";
|
||||
setmodel (self, "progs/dog.mdl");
|
||||
}
|
||||
if (self.buildtype == IID_BUILD_TESLA)
|
||||
if (self.buildtype == IID_BUILD_TTURRET || self.buildtype == IID_BUILD_RTURRET || self.buildtype == IID_BUILD_GTURRET)
|
||||
{
|
||||
FinishTesla();
|
||||
FinishTurret();
|
||||
}
|
||||
|
||||
self = oself;
|
||||
|
|
|
@ -350,7 +350,7 @@ void() worldspawn =
|
|||
{
|
||||
lastspawn = world;
|
||||
InitBodyQue ();
|
||||
coop = 1;
|
||||
coop = !cvar("deathmatch");
|
||||
create_referees();
|
||||
SetupStats();
|
||||
|
||||
|
@ -664,7 +664,7 @@ void() StartFrame =
|
|||
timelimit = cvar("timelimit") * 60;
|
||||
fraglimit = cvar("fraglimit");
|
||||
teamplay = cvar("teamplay");
|
||||
deathmatch = cvar("deathmatch");
|
||||
deathmatch = !coop;
|
||||
|
||||
framecount = framecount + 1;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue