From 5f9fe97f7cfedec45fb8cf599d2c52eb69e76027 Mon Sep 17 00:00:00 2001 From: James Haley Date: Mon, 27 Sep 2010 17:40:54 +0000 Subject: Code for line types 196 and 212 (thought I committed that already o_O), and code to transfer leveltime across map changes in G_DoWorldDone. Subversion-branch: /branches/strife-branch Subversion-revision: 2144 --- src/strife/g_game.c | 27 +++++++++++++++++++++------ src/strife/p_mobj.c | 2 +- src/strife/p_pspr.c | 11 ++++------- src/strife/p_spec.c | 18 ++++++++++++++++++ src/strife/p_switch.c | 5 +---- 5 files changed, 45 insertions(+), 18 deletions(-) diff --git a/src/strife/g_game.c b/src/strife/g_game.c index 96a17ae4..d283c94a 100644 --- a/src/strife/g_game.c +++ b/src/strife/g_game.c @@ -1567,16 +1567,31 @@ boolean G_RiftCheat(int riftSpotNum) // void G_DoWorldDone (void) { + int temp_leveltime = leveltime; + gamestate = GS_LEVEL; gamemap = destmap; - + // STRIFE-TODO: hubs bullshit - + // G_LoadPath(); + // if (!deathmatch) + // ebx0 = (*(_DWORD *)(players[0].mo + 104) & 0x8000000) > 0; + // G_DoLoadGame(...); + + // temporary substitute: G_DoLoadLevel (); + // [STRIFE] leveltime carries over between maps + leveltime = temp_leveltime; + if(!deathmatch) { // STRIFE-TODO: powerup transfers etc + // *(_WORD *)(players[0].mo + 106) &= 0xF7FBu; + // if (v1) + // *(_BYTE *)(plaeyrs[0].mo + 106) |= 4u; + // if (ebx0) + // *(_BYTE *)(players[0].mo + 107) |= 8u; G_RiftPlayer(); @@ -1612,9 +1627,9 @@ void G_LoadGame (char* name) void G_DoLoadGame (void) { int savedleveltime; - + gameaction = ga_nothing; - + save_stream = fopen(savename, "rb"); if (save_stream == NULL) @@ -1644,12 +1659,12 @@ void G_DoLoadGame (void) P_UnArchiveSpecials (); if (!P_ReadSaveGameEOF()) - I_Error ("Bad savegame"); + I_Error ("Bad savegame"); fclose(save_stream); if (setsizeneeded) - R_ExecuteSetViewSize (); + R_ExecuteSetViewSize (); // draw the pattern into the back screen R_FillBackScreen (); diff --git a/src/strife/p_mobj.c b/src/strife/p_mobj.c index 36b05cbd..b2af4c07 100644 --- a/src/strife/p_mobj.c +++ b/src/strife/p_mobj.c @@ -612,7 +612,7 @@ P_SpawnMobj mobj->health = info->spawnhealth; // haleyjd 09/25/10: [STRIFE] Doesn't do this; messes up flamethrower - // and a lot of other stuff. + // and a lot of other stuff using reactiontime as a counter. //if (gameskill != sk_nightmare) mobj->reactiontime = info->reactiontime; diff --git a/src/strife/p_pspr.c b/src/strife/p_pspr.c index ce03b6b7..fb6d3990 100644 --- a/src/strife/p_pspr.c +++ b/src/strife/p_pspr.c @@ -560,11 +560,8 @@ void A_FireGrenade(player_t* player, pspdef_t* pspr) // decide on what type of grenade to spawn if(player->readyweapon == wp_hegrenade) type = MT_HEGRENADE; - else - { - if(player->readyweapon == wp_wpgrenade) - type = MT_PGRENADE; - } + else if(player->readyweapon == wp_wpgrenade) + type = MT_PGRENADE; player->ammo[weaponinfo[player->readyweapon].ammo]--; @@ -749,8 +746,8 @@ void A_FireMauler1(player_t* player, pspdef_t* pspr) t = P_Random(); angle += (t - P_Random()) << 19; t = P_Random(); - P_LineAttack(player->mo, angle, (2112*FRACUNIT), - bulletslope + ((t - P_Random())<<5), damage); + P_LineAttack(player->mo, angle, 2112*FRACUNIT, + bulletslope + ((t - P_Random())<<5), damage); } } } diff --git a/src/strife/p_spec.c b/src/strife/p_spec.c index a53b6584..af070d55 100644 --- a/src/strife/p_spec.c +++ b/src/strife/p_spec.c @@ -980,6 +980,15 @@ P_CrossSpecialLine line->special = 0; break; + case 196: + // haleyjd 09/26/10: [STRIFE] W1 Floor Lower to Lowest if Sigil Type > 0 + if(thing->player->sigiltype > 0) + { + EV_DoFloor(line, lowerFloorToLowest); + line->special = 0; + } + break; + case 200: // haleyjd 09/21/10: [STRIFE] W1 Open Door if Sigil Owned if(!(thing->player->weaponowned[wp_sigil])) @@ -1044,6 +1053,15 @@ P_CrossSpecialLine line->special = 0; break; + case 212: + // haleyjd 09/25/10: [STRIFE] W1 Floor Lower to Lowest if Have Flamethrower + if(thing->player->weaponowned[wp_flame]) + { + EV_DoFloor(line, lowerFloorToLowest); + line->special = 0; + } + break; + case 215: // haleyjd 09/21/10: [STRIFE] W1 Voiced Objective if Quest (Tag/100, Tag%100) // must be player 1... diff --git a/src/strife/p_switch.c b/src/strife/p_switch.c index 70bf41c3..99bc9f09 100644 --- a/src/strife/p_switch.c +++ b/src/strife/p_switch.c @@ -485,10 +485,7 @@ boolean P_UseSpecialLine(mobj_t* thing, line_t* line, int side) break; } } - - // [STRIFE] TODO: here on down mostly untouched so far, - // except for a few new types at the bottom. - + // do something switch(line->special) { -- cgit v1.2.3