mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
more multiplayer fixes
git-svn-id: https://svn.eduke32.com/eduke32@1673 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
1102b74a35
commit
8a3dd08b14
9 changed files with 587 additions and 541 deletions
|
@ -7673,7 +7673,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
|||
mylight.horiz = SH;
|
||||
mylight.minshade = sprite[i].xoffset;
|
||||
mylight.maxshade = sprite[i].yoffset;
|
||||
mylight.tilenum = sprite[i].owner;
|
||||
mylight.tilenum = actor[i].picnum;
|
||||
|
||||
if (CS & 2)
|
||||
{
|
||||
|
|
|
@ -492,7 +492,7 @@ extern char tempbuf[2048], packbuf[PACKBUF_SIZE], menutextbuf[128];
|
|||
extern int32_t g_spriteGravity;
|
||||
|
||||
extern int32_t g_impactDamage,g_actorRespawnTime,g_itemRespawnTime;
|
||||
extern int32_t g_startArmorAmount;
|
||||
extern int32_t g_startArmorAmount, g_maxPlayerHealth;
|
||||
|
||||
#define MOVFIFOSIZ 256
|
||||
|
||||
|
@ -1088,6 +1088,7 @@ enum DukePacket_t
|
|||
PACKET_VERSION,
|
||||
PACKET_AUTH,
|
||||
PACKET_PLAYER_READY,
|
||||
PACKET_MAP_STREAM,
|
||||
|
||||
// any packet with an ID higher than PACKET_BROADCAST is rebroadcast by server
|
||||
// so hacked clients can't create fake server packets and get the server to
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -500,6 +500,8 @@ const char *keyw[] =
|
|||
"qstrncat", // 348
|
||||
"ifactorsound", // 349
|
||||
"stopactorsound", // 350
|
||||
"ifclient", // 351
|
||||
"ifserver", // 352
|
||||
"<null>"
|
||||
};
|
||||
|
||||
|
@ -4906,6 +4908,8 @@ repeatcase:
|
|||
return 0;
|
||||
}
|
||||
|
||||
case CON_IFCLIENT:
|
||||
case CON_IFSERVER:
|
||||
case CON_IFONWATER:
|
||||
case CON_IFINWATER:
|
||||
case CON_IFACTORNOTSTAYPUT:
|
||||
|
@ -5768,7 +5772,7 @@ repeatcase:
|
|||
j = 0;
|
||||
ud.const_visibility = params[j++];
|
||||
g_impactDamage = params[j++];
|
||||
g_player[0].ps->max_player_health = g_player[0].ps->max_shield_amount = params[j++];
|
||||
g_maxPlayerHealth = g_player[0].ps->max_player_health = g_player[0].ps->max_shield_amount = params[j++];
|
||||
g_startArmorAmount = params[j++];
|
||||
g_actorRespawnTime = params[j++];
|
||||
g_itemRespawnTime = params[j++];
|
||||
|
|
|
@ -911,6 +911,8 @@ enum ScriptKeywords_t
|
|||
CON_QSTRNCAT, // 348
|
||||
CON_IFACTORSOUND, // 349
|
||||
CON_STOPACTORSOUND, // 350
|
||||
CON_IFCLIENT, // 351
|
||||
CON_IFSERVER, // 352
|
||||
CON_END
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -617,43 +617,35 @@ GAMEEXEC_STATIC void VM_Move(void)
|
|||
}
|
||||
|
||||
{
|
||||
vec3_t tmpvect;
|
||||
vec3_t tmpvect = { (daxvel*(sintable[(angdif+512)&2047]))>>14,
|
||||
(daxvel*(sintable[angdif&2047]))>>14, vm.g_sp->zvel };
|
||||
|
||||
tmpvect.x = (daxvel*(sintable[(angdif+512)&2047]))>>14;
|
||||
tmpvect.y = (daxvel*(sintable[angdif&2047]))>>14;
|
||||
tmpvect.z = vm.g_sp->zvel;
|
||||
actor[vm.g_i].movflag = A_MoveSprite(vm.g_i,&tmpvect,CLIPMASK0);
|
||||
}
|
||||
}
|
||||
|
||||
if (a)
|
||||
{
|
||||
if (sector[vm.g_sp->sectnum].ceilingstat&1)
|
||||
vm.g_sp->shade += (sector[vm.g_sp->sectnum].ceilingshade-vm.g_sp->shade)>>1;
|
||||
else vm.g_sp->shade += (sector[vm.g_sp->sectnum].floorshade-vm.g_sp->shade)>>1;
|
||||
if (!a) return;
|
||||
|
||||
if (sector[vm.g_sp->sectnum].floorpicnum == MIRROR)
|
||||
deletesprite(vm.g_i);
|
||||
}
|
||||
if (sector[vm.g_sp->sectnum].ceilingstat&1)
|
||||
vm.g_sp->shade += (sector[vm.g_sp->sectnum].ceilingshade-vm.g_sp->shade)>>1;
|
||||
else vm.g_sp->shade += (sector[vm.g_sp->sectnum].floorshade-vm.g_sp->shade)>>1;
|
||||
|
||||
// wtf?
|
||||
/*
|
||||
if (sector[vm.g_sp->sectnum].floorpicnum == MIRROR)
|
||||
deletesprite(vm.g_i);
|
||||
*/
|
||||
}
|
||||
|
||||
GAMEEXEC_STATIC GAMEEXEC_INLINE void __fastcall VM_DoConditional(register int32_t condition)
|
||||
{
|
||||
if (condition)
|
||||
if (condition || ((insptr = (intptr_t *)*(insptr+1)) && (((*insptr)&0xFFF) == CON_ELSE)))
|
||||
{
|
||||
// skip 'else' pointer.. and...
|
||||
insptr += 2;
|
||||
VM_Execute(1);
|
||||
return;
|
||||
}
|
||||
insptr = (intptr_t *) *(insptr+1);
|
||||
if (((*insptr)&0xFFF) == CON_ELSE)
|
||||
{
|
||||
// else...
|
||||
// skip 'else' and...
|
||||
insptr += 2;
|
||||
VM_Execute(1);
|
||||
}
|
||||
}
|
||||
|
||||
GAMEEXEC_STATIC int32_t VM_Execute(int32_t once)
|
||||
|
@ -3055,7 +3047,15 @@ nullquote:
|
|||
continue;
|
||||
|
||||
case CON_IFMULTIPLAYER:
|
||||
VM_DoConditional((g_netServer || ud.multimode > 1));
|
||||
VM_DoConditional((g_netServer || g_netClient || ud.multimode > 1));
|
||||
continue;
|
||||
|
||||
case CON_IFCLIENT:
|
||||
VM_DoConditional(g_netClient != NULL);
|
||||
continue;
|
||||
|
||||
case CON_IFSERVER:
|
||||
VM_DoConditional(g_netServer != NULL);
|
||||
continue;
|
||||
|
||||
case CON_OPERATE:
|
||||
|
|
|
@ -142,7 +142,7 @@ int16_t BlimpSpawnSprites[15] =
|
|||
FREEZEAMMO__STATIC
|
||||
};
|
||||
|
||||
int32_t g_impactDamage;
|
||||
int32_t g_impactDamage, g_maxPlayerHealth;
|
||||
int32_t g_scriptDebug;
|
||||
|
||||
//GLOBAL.C - replace the end "my's" with this
|
||||
|
|
|
@ -380,7 +380,7 @@ void MV_ServiceVoc(void)
|
|||
//Commented out so that the buffer is always cleared.
|
||||
//This is so the guys at Echo Speech can mix into the
|
||||
//buffer even when no sounds are playing.
|
||||
//if ( !MV_BufferEmpty[ MV_MixPage ] )
|
||||
if (!MV_BufferEmpty[MV_MixPage])
|
||||
{
|
||||
ClearBuffer_DW(MV_MixBuffer[ MV_MixPage ], MV_Silence, MV_BufferSize >> 2);
|
||||
MV_BufferEmpty[ MV_MixPage ] = TRUE;
|
||||
|
|
|
@ -1915,12 +1915,12 @@ int32_t G_EnterLevel(int32_t g)
|
|||
S_PlayMusic(&MapInfo[(uint8_t)g_musicIndex].musicfn[0],g_musicIndex);
|
||||
}
|
||||
|
||||
if ((g&MODE_GAME) || (g&MODE_EOL))
|
||||
if (g & (MODE_GAME|MODE_EOL))
|
||||
{
|
||||
TRAVERSE_CONNECT(i)
|
||||
g_player[i].ps->gm = MODE_GAME;
|
||||
}
|
||||
else if (g&MODE_RESTART)
|
||||
else if (g & MODE_RESTART)
|
||||
{
|
||||
if (ud.recstat == 2)
|
||||
g_player[myconnectindex].ps->gm = MODE_DEMO;
|
||||
|
@ -1930,10 +1930,8 @@ int32_t G_EnterLevel(int32_t g)
|
|||
if ((ud.recstat == 1) && (g&MODE_RESTART) != MODE_RESTART)
|
||||
G_OpenDemoWrite();
|
||||
|
||||
if (VOLUMEONE)
|
||||
{
|
||||
if (ud.level_number == 0 && ud.recstat != 2) P_DoQuote(40,g_player[myconnectindex].ps);
|
||||
}
|
||||
if (VOLUMEONE && ud.level_number == 0 && ud.recstat != 2)
|
||||
P_DoQuote(40,g_player[myconnectindex].ps);
|
||||
|
||||
TRAVERSE_CONNECT(i)
|
||||
switch (DynamicTileMap[sector[sprite[g_player[i].ps->i].sectnum].floorpicnum])
|
||||
|
|
Loading…
Reference in a new issue