Skip to content

Commit

Permalink
Update function parameters for antilag stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
dusty-qw committed Sep 20, 2024
1 parent dbc6adb commit cd7f8bd
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
8 changes: 4 additions & 4 deletions src/antilag.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ float Physics_PushEntity(float push_x, float push_y, float push_z, int failonsta
if (self->s.v.solid >= SOLID_TRIGGER && (!((int)self->s.v.flags & FL_ONGROUND) || (self->s.v.groundentity != g_globalvars.trace_ent)))
{
other = PROG_TO_EDICT(g_globalvars.trace_ent);
((void(*)())(self->touch))();
((void(*)(void))(self->touch))();
}
}

Expand Down Expand Up @@ -229,7 +229,7 @@ void antilag_delete_world(gedict_t *e)
data->next->prev = data->prev;
}

void antilag_updateworld()
void antilag_updateworld(void)
{
if (g_globalvars.time < antilag_nextthink_world)
return;
Expand Down Expand Up @@ -607,7 +607,7 @@ void antilag_lagmove_all_proj(gedict_t *owner, gedict_t *e)
other = PROG_TO_EDICT(g_globalvars.trace_ent);
self = e;
self->s.v.flags = ((int)self->s.v.flags) | FL_GODMODE;
((void(*)())(self->touch))();
((void(*)(void))(self->touch))();

self = oself;
antilag_unmove_all(); // emergency antilag cleanup
Expand Down Expand Up @@ -639,7 +639,7 @@ void antilag_lagmove_all_proj(gedict_t *owner, gedict_t *e)
other = PROG_TO_EDICT(g_globalvars.trace_ent);
self = e;
self->s.v.flags = ((int)self->s.v.flags) | FL_GODMODE;
((void(*)())(self->touch))();
((void(*)(void))(self->touch))();
break;
//}
}
Expand Down
8 changes: 4 additions & 4 deletions src/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1606,7 +1606,7 @@ qbool WeaponPrediction_SendEntity(gedict_t *to, int sendflags)
}


void WeaponPrediction_MarkSendFlags()
void WeaponPrediction_MarkSendFlags(void)
{
gedict_t *wep = self->weapon_pred;
int sendflags = 64;
Expand Down Expand Up @@ -1660,7 +1660,7 @@ void WeaponPrediction_MarkSendFlags()
}


void WeaponPrediction_Cleanup()
void WeaponPrediction_Cleanup(void)
{
if (self->weapon_pred != NULL)
{
Expand All @@ -1670,7 +1670,7 @@ void WeaponPrediction_Cleanup()
}


void WeaponPrediction_CreateEnt()
void WeaponPrediction_CreateEnt(void)
{
gedict_t *wep_values = spawn();
wep_values->s.v.owner = EDICT_TO_PROG(self);
Expand Down Expand Up @@ -4505,7 +4505,7 @@ void PlayerPostThink(void)

self->client_time = self->client_nextthink;
self->client_nextthink = 0;
((void(*)())(self->client_think))();
((void(*)(void))(self->client_think))();

self->client_time = held_client_time;
}
Expand Down
4 changes: 3 additions & 1 deletion src/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ void ToggleNewCoopNm(void);
void ToggleVwep(void);
void TogglePause(void);
void ToggleArena(void);
void ToggleToT(void);
void ToggleDropMessage(void);

void Spawn666Time(void);

Expand Down Expand Up @@ -2779,7 +2781,7 @@ void ToggleDischarge(void)
cvar_toggle_msg(self, "k_dis", redtext("discharges"));
}

void ToggleDropMessage()
void ToggleDropMessage(void)
{
if (match_in_progress)
{
Expand Down
2 changes: 1 addition & 1 deletion src/g_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ intptr_t VISIBILITY_VISIBLE vmMain(
self = PROG_TO_EDICT(g_globalvars.self);

if (self->SendEntity)
return ((int(*)())(self->SendEntity))(PROG_TO_EDICT(arg0), arg1);
return ((int(*)(edict_t*, int))(self->SendEntity))(PROG_TO_EDICT(arg0), arg1);

Check warning on line 445 in src/g_main.c

View workflow job for this annotation

GitHub Actions / verify-msvc

'function': incompatible types - from 'gedict_t *' to 'edict_t *' [D:\a\ktx\ktx\builddir\qwprogs.vcxproj]

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/player.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ void muzzleflash(void)
trap_multicast(PASSVEC3(self->s.v.origin), MULTICAST_PVS);
}

void player_dummyanim()
void player_dummyanim(void)
{

}
Expand Down
4 changes: 2 additions & 2 deletions src/weapons.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ void FireInstaBullet(vec3_t dir, deathType_t deathtype)
int depth, solid;
float fraction;
gedict_t *ignore;
qbool do_antilag = (self->ct == ctPlayer); // hacky check
//qbool do_antilag = (self->ct == ctPlayer); // hacky check

if (cvar("k_cg_kb"))
{
Expand Down Expand Up @@ -1006,7 +1006,7 @@ void T_InstaKickback(void)
ent_remove(self);
}

void T_MissileExplode_Antilag()
void T_MissileExplode_Antilag(void)
{
gedict_t *own = PROG_TO_EDICT(self->s.v.owner);

Expand Down
2 changes: 1 addition & 1 deletion src/world.c
Original file line number Diff line number Diff line change
Expand Up @@ -1813,7 +1813,7 @@ void check_fcheck(void);
void CheckTeamStatus(void);
void SendSpecInfo(void);
void DoMVDAutoTrack(void);
void antilag_updateworld();
void antilag_updateworld(void);

void FixNoSpecs(void);

Expand Down

0 comments on commit cd7f8bd

Please sign in to comment.