summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSamuel Villareal2010-09-05 05:05:17 +0000
committerSamuel Villareal2010-09-05 05:05:17 +0000
commit289ae90614062bf5ab367a1befcec98ab99e7094 (patch)
treefa3602dd719f9f815799e6b25d356dc32d0cd067 /src
parent1fc397741ffd103629cce3d06946865a7bc437c3 (diff)
downloadchocolate-doom-289ae90614062bf5ab367a1befcec98ab99e7094.tar.gz
chocolate-doom-289ae90614062bf5ab367a1befcec98ab99e7094.tar.bz2
chocolate-doom-289ae90614062bf5ab367a1befcec98ab99e7094.zip
+ A_FireSigil implemented
+ P_PlayerThink updated (checks for extralight) + New cheats added to cheat_t Subversion-branch: /branches/strife-branch Subversion-revision: 2011
Diffstat (limited to 'src')
-rw-r--r--src/strife/d_player.h8
-rw-r--r--src/strife/p_pspr.c105
-rw-r--r--src/strife/p_user.c16
3 files changed, 106 insertions, 23 deletions
diff --git a/src/strife/d_player.h b/src/strife/d_player.h
index c4b9d7e1..711827a5 100644
--- a/src/strife/d_player.h
+++ b/src/strife/d_player.h
@@ -75,7 +75,13 @@ typedef enum
// No damage, no health loss.
CF_GODMODE = 2,
// Not really a cheat, just a debug aid.
- CF_NOMOMENTUM = 4
+ CF_NOMOMENTUM = 4,
+ // villsa [STRIFE] new cheat
+ // set when on fire and disable inventory
+ CF_ONFIRE = 8,
+ // villsa [STRIFE] new cheat
+ // auto-use medkits
+ CF_AUTOHEALTH = 16
} cheat_t;
diff --git a/src/strife/p_pspr.c b/src/strife/p_pspr.c
index d0fface0..8d0940ce 100644
--- a/src/strife/p_pspr.c
+++ b/src/strife/p_pspr.c
@@ -498,25 +498,6 @@ void A_Punch(player_t* player, pspdef_t* psp)
}
-// Doom does not check the bounds of the ammo array. As a result,
-// it is possible to use an ammo type > 4 that overflows into the
-// maxammo array and affects that instead. Through dehacked, for
-// example, it is possible to make a weapon that decreases the max
-// number of ammo for another weapon. Emulate this.
-
-static void DecreaseAmmo(player_t *player, int ammonum, int amount)
-{
- if (ammonum < NUMAMMO)
- {
- player->ammo[ammonum] -= amount;
- }
- else
- {
- player->maxammo[ammonum - NUMAMMO] -= amount;
- }
-}
-
-
//
// A_FireFlameThrower
// villsa [STRIFE] new codepointer
@@ -770,7 +751,91 @@ void A_SigilSound(player_t* player, pspdef_t* pspr)
void A_FireSigil(player_t* player, pspdef_t* pspr)
{
+ mobj_t* mo;
+ angle_t an;
+ int i;
+
+ // keep info on armor because sigil does piercing damage
+ i = player->armortype;
+ player->armortype = 0;
+ P_DamageMobj(player->mo, player->mo, 0, 4 * player->sigiltype + 1);
+
+ // restore armor
+ player->armortype = i;
+
+ S_StartSound(player->mo, sfx_siglup);
+
+ switch(player->sigiltype)
+ {
+ // falling lightning bolts from the sky
+ case 0:
+ P_BulletSlope(player->mo);
+ if(linetarget)
+ {
+ mo = P_SpawnMobj(linetarget->x, linetarget->y, -ONFLOORZ, MT_SIGIL_A_GROUND);
+ mo->tracer = linetarget;
+ }
+ else
+ {
+ an = player->mo->angle>>ANGLETOFINESHIFT;
+ mo = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_SIGIL_A_GROUND);
+ mo->momx += FixedMul((28*FRACUNIT), finecosine[an]);
+ mo->momy += FixedMul((28*FRACUNIT), finesine[an]);
+ }
+ mo->health = -1;
+ mo->target = player->mo;
+ break;
+
+ // simple projectile
+ case 1:
+ P_SpawnPlayerMissile(player->mo, MT_SIGIL_B_SHOT)->health = -1;
+ break;
+
+ // spread shot
+ case 2:
+ player->mo->angle -= ANG90;
+ for(i = 0; i < 20; i++)
+ {
+ player->mo->angle += (ANG90 / 10);
+ mo = P_SpawnMortar(player->mo, MT_SIGIL_C_SHOT);
+ mo->health = -1;
+ mo->z = player->mo->z + (32*FRACUNIT);
+ }
+ player->mo->angle -= ANG90;
+ break;
+ // tracer attack
+ case 3:
+ P_BulletSlope(player->mo);
+ if(linetarget)
+ {
+ mo = P_SpawnPlayerMissile(player->mo, MT_SIGIL_D_SHOT);
+ mo->tracer = linetarget;
+ }
+ else
+ {
+ an = player->mo->angle>>ANGLETOFINESHIFT;
+ mo = P_SpawnPlayerMissile(player->mo, MT_SIGIL_D_SHOT);
+ mo->momx += FixedMul(mo->info->speed, finecosine[an]);
+ mo->momy += FixedMul(mo->info->speed, finesine[an]);
+ }
+ mo->health = -1;
+ break;
+
+ // mega blast
+ case 4:
+ mo = P_SpawnPlayerMissile(player->mo, MT_SIGIL_E_SHOT);
+ mo->health = -1;
+ if(!linetarget)
+ {
+ an = player->pitch>>ANGLETOFINESHIFT;
+ mo->momz += FixedMul(finesine[an], mo->info->speed);
+ }
+ break;
+
+ default:
+ break;
+ }
}
//
@@ -829,7 +894,7 @@ void A_TorpedoExplode(mobj_t* actor)
for(i = 0; i < 80; i++)
{
- actor->angle += 0x3333333;
+ actor->angle += (ANG90 / 20);
P_SpawnMortar(actor, MT_TORPEDOSPREAD)->target = actor->target;
}
}
diff --git a/src/strife/p_user.c b/src/strife/p_user.c
index 5a140190..12bc686f 100644
--- a/src/strife/p_user.c
+++ b/src/strife/p_user.c
@@ -448,9 +448,21 @@ void P_PlayerThink (player_t* player)
if (player->bonuscount)
player->bonuscount--;
+ // villsa [STRIFE] checks for extralight
+ if(player->extralight >= 0)
+ {
+ if(player->cheats & CF_ONFIRE)
+ player->fixedcolormap = 1;
+ else
+ player->fixedcolormap = 0;
+ }
+ else
+ player->fixedcolormap = INVERSECOLORMAP;
+
+ // villsa [STRIFE] unused
// Handling colormaps.
- if (player->powers[pw_invulnerability])
+ /*if (player->powers[pw_invulnerability])
{
if (player->powers[pw_invulnerability] > 4*32
|| (player->powers[pw_invulnerability]&8) )
@@ -470,7 +482,7 @@ void P_PlayerThink (player_t* player)
player->fixedcolormap = 0;
}
else
- player->fixedcolormap = 0;
+ player->fixedcolormap = 0;*/
}