mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-23 15:52:41 +02:00
port: net: ignore handicap in netgames
This commit is contained in:
1 parent
c4a3c18208
commit
67bc9c4858
2 files changed
+8
No files matched your search
@@ -783,6 +783,7 @@ void netPlayersAllocate(void)
|
||||
cl->player = g_Vars.players[cl->playernum];
|
||||
cl->config = &g_PlayerConfigsArray[cl->playernum];
|
||||
cl->config->client = cl;
|
||||
cl->config->handicap = 0x80;
|
||||
cl->player->client = cl;
|
||||
cl->player->isremote = (cl != g_NetLocalClient);
|
||||
}
|
||||
|
||||
@@ -143,11 +143,18 @@ struct extplayerconfig g_PlayerExtCfg[MAX_LOCAL_PLAYERS] = {
|
||||
* value 0 will return 0.1
|
||||
* value 127 will return 1
|
||||
* value 255 will return 10
|
||||
* in a netgame it's always 1
|
||||
*/
|
||||
f32 mpHandicapToDamageScale(u8 value)
|
||||
{
|
||||
f32 tmp;
|
||||
|
||||
#ifndef PLATFORM_N64
|
||||
if (g_NetMode) {
|
||||
return 1.f;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (value < 127) {
|
||||
return (value / 127.0f) * (value / 127.0f) * 0.9f + 0.1f;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user