ref: 5f9fe97f7cfedec45fb8cf599d2c52eb69e76027
parent: fee277eb0a3bfee3000a6f2adb610ab0b274a917
author: James Haley <[email protected]>
date: Mon Sep 27 13:40:54 EDT 2010
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
--- a/src/strife/g_game.c
+++ b/src/strife/g_game.c
@@ -1567,16 +1567,31 @@
//
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_DoLoadGame (void)
{
int savedleveltime;
-
+
gameaction = ga_nothing;
-
+
save_stream = fopen(savename, "rb");
if (save_stream == NULL)
@@ -1644,12 +1659,12 @@
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 ();
--- a/src/strife/p_mobj.c
+++ b/src/strife/p_mobj.c
@@ -612,7 +612,7 @@
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;
--- a/src/strife/p_pspr.c
+++ b/src/strife/p_pspr.c
@@ -560,11 +560,8 @@
// 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 @@
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);
}
}
}
--- a/src/strife/p_spec.c
+++ b/src/strife/p_spec.c
@@ -980,6 +980,15 @@
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]))
@@ -1042,6 +1051,15 @@
// Put up a message
thing->player->message = DEH_String("Incoming Message from BlackBird...");
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:
--- a/src/strife/p_switch.c
+++ b/src/strife/p_switch.c
@@ -485,10 +485,7 @@
break;
}
}
-
- // [STRIFE] TODO: here on down mostly untouched so far,
- // except for a few new types at the bottom.
-
+
// do something
switch(line->special)
{