1
0
Fork 0
forked from fte/fteqw

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3425 fc73d0e0-1445-4013-8a0c-d673dee63da5

This commit is contained in:
Magnus 2009-11-07 13:28:20 +00:00
parent 2ffd7f4b5f
commit 3554c9c9e8
3 changed files with 58 additions and 34 deletions

View file

@ -1022,7 +1022,35 @@ void(string arg1) Cmd_InvMix =
sprint(self, PRINT_MEDIUM, "1 super stim created\n"); sprint(self, PRINT_MEDIUM, "1 super stim created\n");
sound (self, CHAN_BODY, "misc/item1.wav", 1, ATTN_NORM); sound (self, CHAN_BODY, "misc/item1.wav", 1, ATTN_NORM);
} }
else if ((iid1 == IID_WP_NEEDLER && iid2 == IID_WP_NEEDLER) ||
(iid2 == IID_WP_NEEDLER && iid1 == IID_WP_NEEDLER))
{
if (random()*100 > (self.skill_science*10))
{
sprint(self, PRINT_MEDIUM, "your concoction exploded!\n");
Explosion();
return;
}
x = FindEmptySlot(self);
if (x == 0)
{
sprint(self, 2, "no more room in inventory!\n");
sound (self, CHAN_BODY, "misc/beep1.wav", 1, ATTN_NORM);
return;
}
DecreaseDestroySlot(23);
DecreaseDestroySlot(24);
SetItemSlot(self, x, SlotVal(IID_WP_ACR, 1));
sprint(self, PRINT_MEDIUM, "Steyr ACR created\n");
sound (self, CHAN_BODY, "misc/item1.wav", 1, ATTN_NORM);
}
else else
{ {
sprint(self, PRINT_MEDIUM, "cannot merge items!\n"); sprint(self, PRINT_MEDIUM, "cannot merge items!\n");

View file

@ -561,6 +561,12 @@ float(entity e, float iid) FindSuitableEmptySlot =
if (ToIID(e.islot16) == IID_NONE) if (ToIID(e.islot16) == IID_NONE)
if (FitsInSlot(16, iid)) if (FitsInSlot(16, iid))
return 16; return 16;
if (ToIID(e.islot15) == IID_NONE)
if (FitsInSlot(23, iid))
return 23;
if (ToIID(e.islot16) == IID_NONE)
if (FitsInSlot(24, iid))
return 24;
} }
else if (IsJunk(iid)) else if (IsJunk(iid))
{ {
@ -576,10 +582,6 @@ float(entity e, float iid) FindSuitableEmptySlot =
return 21; return 21;
if (ToIID(e.islot22) == IID_NONE) if (ToIID(e.islot22) == IID_NONE)
return 22; return 22;
if (ToIID(e.islot23) == IID_NONE)
return 23;
if (ToIID(e.islot24) == IID_NONE)
return 24;
} }
return 0; return 0;
}; };
@ -635,10 +637,6 @@ slot_t(float slot) SlotField =
return islot23; return islot23;
if (slot == 24) if (slot == 24)
return islot24; return islot24;
if (slot == 25)
return mixslot1;
if (slot == 26)
return mixslot2;
//bprint(PRINT_MEDIUM, "ERROR: Invalid slot number (", ftos(slot), ")\n"); //bprint(PRINT_MEDIUM, "ERROR: Invalid slot number (", ftos(slot), ")\n");
return islot1; return islot1;
@ -1510,31 +1508,31 @@ float(float iid) GetBaseValue =
if (iid == IID_AM_NEEDLER) if (iid == IID_AM_NEEDLER)
return 1; return 7;
if (iid == IID_AM_2MMEC) if (iid == IID_AM_2MMEC)
return 1; return 15;
if (iid == IID_AM_10MM) if (iid == IID_AM_10MM)
return 1; return 3;
if (iid == IID_AM_556MM) if (iid == IID_AM_556MM)
return 1; return 5;
if (iid == IID_AM_5MMHIGHVEL) if (iid == IID_AM_5MMHIGHVEL)
return 1; return 4;
if (iid == IID_AM_12GAUGESHELLS) if (iid == IID_AM_12GAUGESHELLS)
return 1; return 4;
if (iid == IID_AM_ENERGYCELL) if (iid == IID_AM_ENERGYCELL)
return 1; return 12;
if (iid == IID_AM_762MM) if (iid == IID_AM_762MM)
return 1; return 8;
if (iid == IID_AM_44MAGNUM) if (iid == IID_AM_44MAGNUM)
return 1; return 6;
if (iid == IID_AM_WARSAW) if (iid == IID_AM_WARSAW)
return 1; return 5;
if (iid == IID_AM_45ACP) if (iid == IID_AM_45ACP)
return 1; return 4;
if (iid == IID_AM_ROCKET) if (iid == IID_AM_ROCKET)
return 1; return 30;
if (iid == IID_AM_CASELESS) if (iid == IID_AM_CASELESS)
return 1; return 10;
if (iid == IID_GREN_STUN) if (iid == IID_GREN_STUN)
@ -2332,10 +2330,7 @@ float(float slotno, float iid) FitsInSlot =
return IsJunk(iid); return IsJunk(iid);
if (slotno == 22) if (slotno == 22)
return IsJunk(iid); return IsJunk(iid);
if (slotno == 23)
return IsJunk(iid);
if (slotno == 24)
return IsJunk(iid);
return true; return true;
}; };

View file

@ -1641,7 +1641,7 @@ void() W_Attack =
else if (weap == IID_WP_AK112_M) else if (weap == IID_WP_AK112_M)
FireAssaultRifle(16, 10, "weapons/ak112.wav", 4000, 0.095); FireAssaultRifle(16, 10, "weapons/ak112.wav", 4000, 0.095);
else if (weap == IID_WP_ACR) else if (weap == IID_WP_ACR)
FireAssaultRifle(16, 7, "weapons/auto2.wav", 9000, 0.090); FireAssaultRifle(16, 7, "weapons/ak112.wav", 9000, 0.090);
else if (weap == IID_WP_AK74) else if (weap == IID_WP_AK74)
FireAssaultRifle(20, 12, "ogre/ak47.wav", 3500, 0.090); FireAssaultRifle(20, 12, "ogre/ak47.wav", 3500, 0.090);
else if (weap == IID_WP_DKS1) else if (weap == IID_WP_DKS1)
@ -1766,6 +1766,7 @@ void() CheatCommand =
self.islot18 = SlotVal(IID_MISC_NUKACOLA, 50); self.islot18 = SlotVal(IID_MISC_NUKACOLA, 50);
self.islot19 = SlotVal(IID_MISC_AEROSOL, 50); self.islot19 = SlotVal(IID_MISC_AEROSOL, 50);
self.islot20 = SlotVal(IID_MISC_GUM, 50); self.islot20 = SlotVal(IID_MISC_GUM, 50);
self.islot10 = SlotVal(IID_WP_ACR, 1);
}; };
/* /*
@ -2548,9 +2549,9 @@ void () FlashExplode =
{ {
if (CanDamage (self, te)) if (CanDamage (self, te))
{ {
te.flash = 4; te.flash = 12;
te.attack_finished = time + 4; te.attack_finished = time + 12;
spawn_excla(te, 4); spawn_excla(te, 12);
} }
} }
@ -2561,9 +2562,9 @@ void () FlashExplode =
te.missionbrief = 5; te.missionbrief = 5;
stuffcmd (te, "v_cshift 255 255 255 255\n"); stuffcmd (te, "v_cshift 255 255 255 255\n");
stuffcmd (te, "v_idlescale 3\n"); stuffcmd (te, "v_idlescale 3\n");
te.flash = time + 4; te.flash = time + 12;
spawn_excla(te, 4); spawn_excla(te, 12);
} }
} }
te = te.chain; te = te.chain;
@ -2580,9 +2581,9 @@ void () FlashExplode =
if (dot > 0.3 && CanDamage (self, te)) if (dot > 0.3 && CanDamage (self, te))
{ {
te.flash = 4; te.flash = 12;
te.attack_finished = time + 4; te.attack_finished = time + 12;
spawn_excla(te, 4); spawn_excla(te, 12);
} }
} }