From d50246e7ca2272d219c9d53e32adcc1846eb8950 Mon Sep 17 00:00:00 2001 From: Magnus Date: Thu, 5 Nov 2009 04:20:47 +0000 Subject: [PATCH] git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3411 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- quakec/fallout2/cmds.qc | 2 + quakec/fallout2/csprogs.src | 2 +- quakec/fallout2/inventory.qc | 81 +---------------------------------- quakec/fallout2/world.qc | 82 ++++++++++++++++++++++++++++++++++++ 4 files changed, 87 insertions(+), 80 deletions(-) diff --git a/quakec/fallout2/cmds.qc b/quakec/fallout2/cmds.qc index 44070214c..21624ed8b 100644 --- a/quakec/fallout2/cmds.qc +++ b/quakec/fallout2/cmds.qc @@ -5,6 +5,8 @@ string(float n) argv = #442; string(string s, float start, float length) substring = #116; float(string str, string sub) strstrofs = #221; + + float(string desc) itemtoslot = { local float slot; diff --git a/quakec/fallout2/csprogs.src b/quakec/fallout2/csprogs.src index fce4ad945..aca467894 100644 --- a/quakec/fallout2/csprogs.src +++ b/quakec/fallout2/csprogs.src @@ -1,4 +1,4 @@ -../csprogs.dat +csprogs.dat csqc/system.qc csqc/stdbuiltins.qc diff --git a/quakec/fallout2/inventory.qc b/quakec/fallout2/inventory.qc index e1c6f6455..0f0937098 100644 --- a/quakec/fallout2/inventory.qc +++ b/quakec/fallout2/inventory.qc @@ -7,6 +7,7 @@ float IID_NONE = 0; //weapons with ammo, things with a toggle state #define NotStackable(iid) (IsRanged(iid)) + //the ammoless weapons float IID_WP_WRENCH = 399; float IID_WP_KNIFE = 400; @@ -189,75 +190,7 @@ float(float slotno, float iid) FitsInSlot; #define MAXSLOTS 24 -void(float sttype, float stnum, string fieldname) clientstat = #232; -void() SetupStats = -{ - //2 is ev_float - //32 is the first stat we are allowed to use - clientstat(2, 32, "islot1"); - clientstat(2, 33, "islot2"); - clientstat(2, 34, "islot3"); - clientstat(2, 35, "islot4"); - clientstat(2, 36, "islot5"); - clientstat(2, 37, "islot6"); - clientstat(2, 38, "islot7"); - clientstat(2, 39, "islot8"); - clientstat(2, 40, "islot9"); - clientstat(2, 41, "islot10"); - clientstat(2, 42, "islot11"); - clientstat(2, 43, "islot12"); - clientstat(2, 44, "islot13"); - clientstat(2, 45, "islot14"); - clientstat(2, 46, "islot15"); - clientstat(2, 47, "islot16"); - clientstat(2, 48, "health"); - clientstat(2, 49, "max_health"); - clientstat(2, 50, "ammo_shells"); - clientstat(2, 51, "ammo_cells"); - clientstat(2, 52, "weight"); - clientstat(2, 53, "max_weight"); - clientstat(2, 54, "position"); - clientstat(2, 55, "rage"); - clientstat(2, 56, "regen"); - clientstat(2, 57, "missionbrief"); - clientstat(2, 58, "sneak"); - clientstat(2, 59, "perk2"); - clientstat(2, 60, "perk1"); - clientstat(2, 61, "current_slot"); - clientstat(2, 62, "team"); - clientstat(2, 63, "class"); - clientstat(2, 64, "start_time"); - clientstat(2, 65, "location"); - clientstat(2, 66, "map_obj"); - clientstat(2, 67, "map_ent1"); - clientstat(2, 68, "map_ent2"); - clientstat(2, 69, "map_ent3"); - clientstat(2, 70, "silencer"); - clientstat(2, 71, "extender"); - clientstat(2, 91, "islot17"); - clientstat(2, 92, "islot18"); - clientstat(2, 93, "islot19"); - clientstat(2, 94, "islot20"); - clientstat(2, 95, "islot21"); - clientstat(2, 96, "islot22"); - clientstat(2, 97, "islot23"); - clientstat(2, 98, "islot24"); - clientstat(2, 99, "recoil"); - clientstat(2, 100, "xslot1"); - clientstat(2, 101, "xslot2"); - clientstat(2, 102, "xslot3"); - clientstat(2, 103, "xslot4"); - clientstat(2, 104, "xslot5"); - clientstat(2, 105, "xslot6"); - clientstat(2, 106, "xslot7"); - clientstat(2, 107, "xslot8"); - clientstat(2, 108, "safezone"); - clientstat(2, 109, "connected"); - clientstat(2, 110, "steadyaim"); - clientstat(2, 125, "timer"); - clientstat(2, 126, "popup"); - clientstat(2, 127, "score"); -}; + #define ToIID(it) floor(it/512) @@ -2517,13 +2450,3 @@ string(float int) GetPerkDesc = }; -float (float int) getperk = -{ - - if (self.perk1 == int) - return TRUE; - else if (self.perk2 == int) - return TRUE; - else - return FALSE; -}; \ No newline at end of file diff --git a/quakec/fallout2/world.qc b/quakec/fallout2/world.qc index 76a205e33..0e63fea3c 100644 --- a/quakec/fallout2/world.qc +++ b/quakec/fallout2/world.qc @@ -13,6 +13,88 @@ void () monster_fish; void (vector jojo) spawn_ghoul; + + +float (float int) getperk = +{ + if (self.perk1 == int) + return TRUE; + else if (self.perk2 == int) + return TRUE; + else + return FALSE; +}; + +void(float stnum, float sttype, .float fieldname) clientstat = #232; +void() SetupStats = +{ + //2 is ev_float + //32 is the first stat we are allowed to use + clientstat(32, 2, islot1); + clientstat(33, 2, islot2); + clientstat(34, 2, islot3); + clientstat(35, 2, islot4); + clientstat(36, 2, islot5); + clientstat(37, 2, islot6); + clientstat(38, 2, islot7); + clientstat(39, 2, islot8); + clientstat(40, 2, islot9); + clientstat(41, 2, islot10); + clientstat(42, 2, islot11); + clientstat(43, 2, islot12); + clientstat(44, 2, islot13); + clientstat(45, 2, islot14); + clientstat(46, 2, islot15); + clientstat(47, 2, islot16); + clientstat(48, 2, health); + clientstat(49, 2, max_health); + clientstat(50, 2, ammo_shells); + clientstat(51, 2, ammo_cells); + clientstat(52, 2, weight); + clientstat(53, 2, max_weight); + clientstat(54, 2, position); + clientstat(55, 2, rage); + clientstat(56, 2, regen); + clientstat(57, 2, missionbrief); + clientstat(58, 2, sneak); + clientstat(59, 2, perk2); + clientstat(60, 2, perk1); + clientstat(61, 2, current_slot); + clientstat(62, 2, team); + clientstat(63, 2, class); + clientstat(64, 2, start_time); + clientstat(65, 2, location); + clientstat(66, 2, map_obj); + clientstat(67, 2, map_ent1); + clientstat(68, 2, map_ent2); + clientstat(69, 2, map_ent3); + clientstat(70, 2, silencer); + clientstat(71, 2, extender); + clientstat(91, 2, islot17); + clientstat(92, 2, islot18); + clientstat(93, 2, islot19); + clientstat(94, 2, islot20); + clientstat(95, 2, islot21); + clientstat(96, 2, islot22); + clientstat(97, 2, islot23); + clientstat(98, 2, islot24); + clientstat(99, 2, recoil); + clientstat(100, 2, xslot1); + clientstat(101, 2, xslot2); + clientstat(102, 2, xslot3); + clientstat(103, 2, xslot4); + clientstat(104, 2, xslot5); + clientstat(105, 2, xslot6); + clientstat(106, 2, xslot7); + clientstat(107, 2, xslot8); + clientstat(108, 2, safezone); + clientstat(109, 2, connected); + clientstat(110, 2, steadyaim); + clientstat(125, 2, timer); + clientstat(126, 2, popup); + clientstat(127, 2, score); +}; + //assesses all current players void() get_difficulty = {