Skip to content

Commit

Permalink
Heretic|Multiplayer|Fixed: Incorrect Hell Staff rain colors
Browse files Browse the repository at this point in the history
The rain color matches the player color in multiplayer games.

IssueID #1820
  • Loading branch information
skyjake committed May 9, 2015
1 parent b600eac commit 3dc45e1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions doomsday/apps/plugins/common/src/p_mapsetup.cpp
Expand Up @@ -865,6 +865,7 @@ static void precacheResources()
# else // __JHERETIC__
Rend_CacheForMobjType(MT_RAINPLR1);
Rend_CacheForMobjType(MT_RAINPLR2);
Rend_CacheForMobjType(MT_RAINPLR3);
Rend_CacheForMobjType(MT_RAINPLR4);
# endif
}
Expand Down
12 changes: 10 additions & 2 deletions doomsday/apps/plugins/heretic/src/p_pspr.c
Expand Up @@ -1522,6 +1522,7 @@ void C_DECL A_SkullRodStorm(mobj_t* actor)
coord_t pos[3];
mobj_t* mo;
int playerNum;
int rainColor = 2; // Singleplayer default (red).
player_t* player;

if(actor->special3-- == 0)
Expand Down Expand Up @@ -1561,8 +1562,15 @@ void C_DECL A_SkullRodStorm(mobj_t* actor)
pos[VX] = actor->origin[VX] + ((P_Random() & 127) - 64);
pos[VY] = actor->origin[VY] + ((P_Random() & 127) - 64);

if((mo = P_SpawnMobjXYZ(MT_RAINPLR1 + actor->special2, pos[VX], pos[VY],
0, P_Random() << 24, MSF_Z_CEIL)))
if(IS_NETGAME)
{
// Rain color matches the player's color.
rainColor = cfg.playerColor[actor->special2 /*plrnum*/];
}

// Rain colors match the player colors.
if((mo = P_SpawnMobjXYZ(MT_RAINPLR1 + rainColor, pos[VX], pos[VY], 0,
P_Random() << 24, MSF_Z_CEIL)))
{
mo->flags |= MF_BRIGHTSHADOW;
mo->target = actor->target;
Expand Down

0 comments on commit 3dc45e1

Please sign in to comment.