Skip to content

Commit

Permalink
Remove multiplayer capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
viti95 committed May 16, 2020
1 parent 522f1f4 commit 7f22fcb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 23 deletions.
24 changes: 12 additions & 12 deletions g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
boolean G_CheckDemoStatus(void);
void G_ReadDemoTiccmd(ticcmd_t *cmd);
void G_WriteDemoTiccmd(ticcmd_t *cmd);
void G_PlayerReborn(int player);
void G_PlayerReborn();
void G_InitNew(skill_t skill, int episode, int map);

void G_DoReborn(int playernum);
Expand Down Expand Up @@ -625,11 +625,11 @@ void G_Ticker(void)
// G_PlayerFinishLevel
// Can when a player completes a level.
//
void G_PlayerFinishLevel(int player)
void G_PlayerFinishLevel()
{
player_t *p;

p = &players[player];
p = &players[0];

memset(p->powers, 0, sizeof(p->powers));
memset(p->cards, 0, sizeof(p->cards));
Expand All @@ -645,24 +645,24 @@ void G_PlayerFinishLevel(int player)
// Called after a player dies
// almost everything is cleared and initialized
//
void G_PlayerReborn(int player)
void G_PlayerReborn()
{
player_t *p;
int i;
int killcount;
int itemcount;
int secretcount;

killcount = players[player].killcount;
itemcount = players[player].itemcount;
secretcount = players[player].secretcount;
killcount = players[0].killcount;
itemcount = players[0].itemcount;
secretcount = players[0].secretcount;

p = &players[player];
p = &players[0];
memset(p, 0, sizeof(*p));

players[player].killcount = killcount;
players[player].itemcount = itemcount;
players[player].secretcount = secretcount;
players[0].killcount = killcount;
players[0].itemcount = itemcount;
players[0].secretcount = secretcount;

p->usedown = p->attackdown = true; // don't do anything immediately
p->playerstate = PST_LIVE;
Expand Down Expand Up @@ -739,7 +739,7 @@ void G_DoCompleted(void)

gameaction = ga_nothing;

G_PlayerFinishLevel(0); // take away cards and stuff
G_PlayerFinishLevel(); // take away cards and stuff

if (automapactive)
AM_Stop();
Expand Down
16 changes: 5 additions & 11 deletions p_mobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#include "doomstat.h"

void G_PlayerReborn(int player);
void G_PlayerReborn();
void P_SpawnMapThing(mapthing_t *mthing);

//
Expand Down Expand Up @@ -548,16 +548,10 @@ void P_SpawnPlayer(mapthing_t *mthing)

mobj_t *mobj;

int i;

// not playing?
if (!playeringame[mthing->type - 1])
return;

p = &players[mthing->type - 1];
p = &players[0];

if (p->playerstate == PST_REBORN)
G_PlayerReborn(mthing->type - 1);
G_PlayerReborn();

x = mthing->x << FRACBITS;
y = mthing->y << FRACBITS;
Expand Down Expand Up @@ -609,13 +603,13 @@ void P_SpawnMapThing(mapthing_t *mthing)
fixed_t z;

// count deathmatch start positions
if (mthing->type == 11)
if (mthing->type == 11 || mthing->type == 2 || mthing->type == 3 || mthing->type == 4)
{
return;
}

// check for players specially
if (mthing->type <= 4)
if (mthing->type == 1)
{
// save spots for respawning in network games
P_SpawnPlayer(mthing);
Expand Down

0 comments on commit 7f22fcb

Please sign in to comment.