'is_predicting' -> 'is_client'
This commit is contained in:
parent
e0cfc853cf
commit
5c7e8d4ffc
12
src/pp/pp.c
12
src/pp/pp.c
@ -1971,7 +1971,7 @@ void P_SpawnEntsFromList(P_Frame *frame, P_EntList ents)
|
|||||||
}
|
}
|
||||||
dst->created_at_ns = frame->time_ns;
|
dst->created_at_ns = frame->time_ns;
|
||||||
dst->created_at_tick = frame->tick;
|
dst->created_at_tick = frame->tick;
|
||||||
dst->sim = !P_tl.is_predicting;
|
dst->sim = !P_tl.is_client;
|
||||||
++frame->ents_count;
|
++frame->ents_count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2205,7 +2205,7 @@ void P_StepFrame(P_Frame *frame)
|
|||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
//- Query ents
|
//- 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_player = P_EntFromKey(frame, P_tl.local_player);
|
||||||
P_Ent *local_guy = P_EntFromKey(frame, local_player->guy);
|
P_Ent *local_guy = P_EntFromKey(frame, local_player->guy);
|
||||||
|
|
||||||
@ -2215,7 +2215,7 @@ void P_StepFrame(P_Frame *frame)
|
|||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
//- Mark simulated ents
|
//- Mark simulated ents
|
||||||
|
|
||||||
if (is_predicting)
|
if (is_client)
|
||||||
{
|
{
|
||||||
P_EntKey local_player_key = local_player->key;
|
P_EntKey local_player_key = local_player->key;
|
||||||
P_EntKey local_guy_key = local_guy->key;
|
P_EntKey local_guy_key = local_guy->key;
|
||||||
@ -2250,7 +2250,7 @@ void P_StepFrame(P_Frame *frame)
|
|||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
//- Spawn pickups
|
//- Spawn pickups
|
||||||
|
|
||||||
if (!is_predicting)
|
if (!is_client)
|
||||||
{
|
{
|
||||||
P_EntList queued_ents = Zi;
|
P_EntList queued_ents = Zi;
|
||||||
for (P_Ent *spawner = P_FirstEnt(frame); !P_IsEntNil(spawner); spawner = P_NextEnt(spawner))
|
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
|
//- Spawn guys
|
||||||
|
|
||||||
if (!is_predicting)
|
if (!is_client)
|
||||||
{
|
{
|
||||||
P_EntList queued_ents = Zi;
|
P_EntList queued_ents = Zi;
|
||||||
for (P_Ent *player = P_FirstEnt(frame); !P_IsEntNil(player); player = P_NextEnt(player))
|
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));
|
bullet->v = MulVec2(bullet->v, 1.0 - SaturateF32(speed_falloff * sim_dt));
|
||||||
|
|
||||||
// TODO: Remove this
|
// TODO: Remove this
|
||||||
if (!is_predicting && !P_IsEntNil(victim))
|
if (!is_client && !P_IsEntNil(victim))
|
||||||
{
|
{
|
||||||
if (damager->is_player)
|
if (damager->is_player)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -559,7 +559,7 @@ Struct(P_Ctx)
|
|||||||
|
|
||||||
Struct(P_ThreadLocalCtx)
|
Struct(P_ThreadLocalCtx)
|
||||||
{
|
{
|
||||||
b32 is_predicting;
|
b32 is_client;
|
||||||
P_EntKey local_player;
|
P_EntKey local_player;
|
||||||
|
|
||||||
//- Per-thread debug info
|
//- Per-thread debug info
|
||||||
|
|||||||
@ -364,7 +364,7 @@ void V_TickForever(WaveLaneCtx *lane)
|
|||||||
P_tl.debug_arena = AcquireArena(Gibi(64));
|
P_tl.debug_arena = AcquireArena(Gibi(64));
|
||||||
P_tl.debug_tint = VEC4(0, 0.4, 0.9, 0.75);
|
P_tl.debug_tint = VEC4(0, 0.4, 0.9, 0.75);
|
||||||
P_tl.out_msgs_arena = AcquireArena(Gibi(64));
|
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 i32 world_pitch = P_WorldPitch;
|
||||||
const f32 zoom_rate = 1.50;
|
const f32 zoom_rate = 1.50;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user