Skip to content

Commit

Permalink
Debug: Checking out filter in deltas
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Sep 3, 2011
1 parent f995c33 commit 9097191
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions doomsday/engine/portable/src/sv_frame.c
Expand Up @@ -413,7 +413,12 @@ void Sv_WritePlayerDelta(const void* deltaPtr)
Writer_WriteByte(msgWriter, i | (d->extraLight & 0xf8));
}
if(df & PDF_FILTER)
{
Writer_WriteUInt32(msgWriter, d->filter);
#ifdef _DEBUG
Con_Message("Sv_WritePlayerDelta: Plr %i, filter %08x\n", delta->delta.id, d->filter);
#endif
}
if(df & PDF_PSPRITES) // Only set if there's something to write.
{
for(i = 0; i < 2; ++i)
Expand Down
11 changes: 11 additions & 0 deletions doomsday/plugins/common/src/g_game.c
Expand Up @@ -1525,6 +1525,7 @@ void G_PlayerReborn(int player)

p = &players[player];

assert(sizeof(p->frags) == sizeof(frags));
memcpy(frags, p->frags, sizeof(frags));
killcount = p->killCount;
itemcount = p->itemCount;
Expand Down Expand Up @@ -1587,6 +1588,16 @@ void G_PlayerReborn(int player)
p->didSecret = true;
}

#ifdef _DEBUG
{
int k;
for(k = 0; k < NUM_WEAPON_TYPES; ++k)
{
Con_Message("Player %i owns wpn %i: %i\n", player, k, p->weapons[k].owned);
}
}
#endif

#else
p->readyWeapon = p->pendingWeapon = WT_FIRST;
p->weapons[WT_FIRST].owned = true;
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/jheretic/include/h_player.h
Expand Up @@ -92,7 +92,7 @@ typedef struct player_s {
boolean keys[NUM_KEY_TYPES];
boolean backpack;

signed int frags[MAXPLAYERS];
int frags[MAXPLAYERS];

weapontype_t readyWeapon;
weapontype_t pendingWeapon; // Is wp_nochange if not changing.
Expand Down

0 comments on commit 9097191

Please sign in to comment.