Skip to content

Commit

Permalink
fix rotated weapons/projectiles
Browse files Browse the repository at this point in the history
cvars can't be set by their pointers directly. The model was also compiled with a bad root bone orientation. Also fixed uninitialized ptr use in func_vehicle.
  • Loading branch information
wootguy committed Sep 11, 2024
1 parent 7760eaf commit 7db1546
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dlls/func/CFuncVehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ void CFuncVehicle :: UpdateSound( void )

void CFuncVehicle :: CheckTurning (void)
{
float maxspeed;
float maxspeed = m_speed;
TraceResult tr;

//bool bTurnIntoWall = false;
Expand Down Expand Up @@ -850,7 +850,7 @@ void CFuncVehicle :: Find( void )
entvars_t *pevTarget = m_ppath->pev;
if ( !FClassnameIs( pevTarget, "path_track" ) )
{
ALERT( at_console, "func_track_train must be on a path of path_track\n" );
ALERT( at_console, "func_vehicle must be on a path of path_track\n" );
m_ppath = NULL;
return;
}
Expand Down
4 changes: 2 additions & 2 deletions dlls/gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ void execMapCfg() {

// must know this value now to know what to precache during this frame
if (name == "mp_mergemodels") {
mp_mergemodels.value = atoi(value.c_str()) != 0;
CVAR_SET_FLOAT("mp_mergemodels", atoi(value.c_str()) != 0);
continue;
}

Expand Down Expand Up @@ -321,7 +321,7 @@ void execServerCfg() {

// must know this value now to know what to precache during this frame (todo: duplicated in map cfg logic)
if (name == "mp_mergemodels") {
mp_mergemodels.value = atoi(value.c_str()) != 0;
CVAR_SET_FLOAT("mp_mergemodels", atoi(value.c_str()) != 0);
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion dlls/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ extern int g_serveractive; // 1 if ServerActivate was called (no longer safe to
extern int g_edictsinit; // 1 if all edicts were allocated so that relocations can begin

#define NOT_PRECACHED_MODEL "models/" MOD_MODEL_FOLDER "not_precached.mdl"
#define MERGED_ITEMS_MODEL "models/" MOD_MODEL_FOLDER "w_items.mdl"
#define MERGED_ITEMS_MODEL "models/" MOD_MODEL_FOLDER "w_items_v2.mdl"
#define NOT_PRECACHED_SOUND "common/null.wav"
#define MAX_PRECACHE 512
#define MAX_PRECACHE_SOUND 511
Expand Down
2 changes: 1 addition & 1 deletion sevenkewp

0 comments on commit 7db1546

Please sign in to comment.