port: net: ignore handicap in netgames

This commit is contained in:
fgsfds committed 2023-12-27 16:08:49 +01:00
1 parent c4a3c18208
commit 67bc9c4858
2 files changed
+8

No files matched your search

+1
View File
@@ -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);
}
+7
View File
@@ -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;
}