'is_predicting' -> 'is_client'

This commit is contained in:
jacob 2026-03-17 21:32:35 -05:00
parent e0cfc853cf
commit 5c7e8d4ffc
3 changed files with 8 additions and 8 deletions

View File

@ -1971,7 +1971,7 @@ void P_SpawnEntsFromList(P_Frame *frame, P_EntList ents)
}
dst->created_at_ns = frame->time_ns;
dst->created_at_tick = frame->tick;
dst->sim = !P_tl.is_predicting;
dst->sim = !P_tl.is_client;
++frame->ents_count;
}
}
@ -2205,7 +2205,7 @@ void P_StepFrame(P_Frame *frame)
//////////////////////////////
//- Query ents
b32 is_predicting = P_tl.is_predicting;
b32 is_client = P_tl.is_client;
P_Ent *local_player = P_EntFromKey(frame, P_tl.local_player);
P_Ent *local_guy = P_EntFromKey(frame, local_player->guy);
@ -2215,7 +2215,7 @@ void P_StepFrame(P_Frame *frame)
//////////////////////////////
//- Mark simulated ents
if (is_predicting)
if (is_client)
{
P_EntKey local_player_key = local_player->key;
P_EntKey local_guy_key = local_guy->key;
@ -2250,7 +2250,7 @@ void P_StepFrame(P_Frame *frame)
//////////////////////////////
//- Spawn pickups
if (!is_predicting)
if (!is_client)
{
P_EntList queued_ents = Zi;
for (P_Ent *spawner = P_FirstEnt(frame); !P_IsEntNil(spawner); spawner = P_NextEnt(spawner))
@ -2297,7 +2297,7 @@ void P_StepFrame(P_Frame *frame)
//////////////////////////////
//- Spawn guys
if (!is_predicting)
if (!is_client)
{
P_EntList queued_ents = Zi;
for (P_Ent *player = P_FirstEnt(frame); !P_IsEntNil(player); player = P_NextEnt(player))
@ -3441,7 +3441,7 @@ void P_StepFrame(P_Frame *frame)
bullet->v = MulVec2(bullet->v, 1.0 - SaturateF32(speed_falloff * sim_dt));
// TODO: Remove this
if (!is_predicting && !P_IsEntNil(victim))
if (!is_client && !P_IsEntNil(victim))
{
if (damager->is_player)
{

View File

@ -559,7 +559,7 @@ Struct(P_Ctx)
Struct(P_ThreadLocalCtx)
{
b32 is_predicting;
b32 is_client;
P_EntKey local_player;
//- Per-thread debug info

View File

@ -364,7 +364,7 @@ void V_TickForever(WaveLaneCtx *lane)
P_tl.debug_arena = AcquireArena(Gibi(64));
P_tl.debug_tint = VEC4(0, 0.4, 0.9, 0.75);
P_tl.out_msgs_arena = AcquireArena(Gibi(64));
P_tl.is_predicting = 1;
P_tl.is_client = 1;
const i32 world_pitch = P_WorldPitch;
const f32 zoom_rate = 1.50;