Open LogicAndTrick opened 3 years ago
This is in SOHL as well - CONTENT_SOLID is declared twice for no reason.
More of a note - Steam added kRenderFxLightMultiplier
which uses renderFx number 21 as well. I moved kRenderFxReflection
to be number 22 instead in my own branch, but that this would break compatibility with any existing maps that use this renderFx - they would need to be updated and recompiled. I don't know how kRenderFxLightMultiplier
works or if it would conflict with kRenderFxReflection
or not.
In SOHL 1.2 this also checks !m_pGoalEnt
:
if ( !m_pGoalEnt || (m_pGoalEnt->pev->origin - pev->origin).Length() < 1 )
There should only be one declaration of DropItem
(the one with const char *pszItemName
matches HL-U).
SOHL declares this function for WriteFields
but doesn't implement it. It should be:
saveHelper.WriteFields( "SWF", pname, pBaseData, pFields, fieldCount );
Same here:
Should be:
if (pev->targetname)
return save.WriteFields( STRING(pev->targetname), "BASE", this, m_SaveData, ARRAYSIZE(m_SaveData) );
else
return save.WriteFields( STRING(pev->classname), "BASE", this, m_SaveData, ARRAYSIZE(m_SaveData) );
Missing gmsgHUDColor
SOHL has commands for hud_color
and VModEnable
here.
Should be:
if ( ( ent->v.effects & EF_NODRAW ) &&
Should be:
case 0:
return slWaitScript;
case 4: case 6:
return slTeleportToScript;
Should be:
if ( !FBitSet( pev->spawnflags, SF_DOOR_SILENT ) )
{
if ( m_toggle_state != TS_GOING_UP && m_toggle_state != TS_GOING_DOWN )
EMIT_SOUND(ENT(pev), CHAN_STATIC, (char*)STRING(pev->noiseMoving), 1, ATTN_NORM);
}
Same in DoorGoDown
:
if ( !FBitSet( pev->spawnflags, SF_DOOR_SILENT ) )
{
if ( m_toggle_state != TS_GOING_UP && m_toggle_state != TS_GOING_DOWN )
EMIT_SOUND(ENT(pev), CHAN_STATIC, (char*)STRING(pev->noiseMoving), 1, ATTN_NORM);
}
MomentaryMoveDone
was renamed to DoorMoveDone
.
An extra check was added:
if ( value > 1.0 )
value = 1.0;
if ( value < 0.0 )
value = 0.0;
Was updated to:
//
// The door has reached needed position.
//
void CMomentaryDoor::DoorMoveDone( void )
{
m_iState = STATE_OFF;
STOP_SOUND(ENT(pev), CHAN_STATIC, (char*)STRING(pev->noiseMoving) );
EMIT_SOUND(ENT(pev), CHAN_STATIC, (char*)STRING(pev->noiseArrived), 1, ATTN_NORM);
}
And
Should be using GetNextAttackDelay
.
Should return bits_SOUND_NONE
(though both these constants resolve to 0)
Is:
int CBaseMonster::Save( CSave &save )
{
if ( !CBaseToggle::Save(save) )
return 0;
if ( pev->targetname )
return save.WriteFields( STRING(pev->targetname), "CBaseMonster", this, m_SaveData, ARRAYSIZE(m_SaveData) );
else
return save.WriteFields( STRING(pev->classname), "CBaseMonster", this, m_SaveData, ARRAYSIZE(m_SaveData) );
}
And
Should be using SetNextThink
.
Should be:
if (!pOther->IsAlive()||!m_pPlatform||!m_pPlatform->pev)
StartObserver
is not called in HL-U, this is what I went with for these lines:
CopyToBodyQue( pev );
UTIL_SetOrigin( this, pSpot->pev->origin );
pev->angles = pev->v_angle = pSpot->pev->v_angle;
}
else
{
// no intermission spot. Push them up in the air, looking down at their corpse
TraceResult tr;
CopyToBodyQue( pev );
UTIL_TraceLine( pev->origin, pev->origin + Vector( 0, 0, 128 ), ignore_monsters, edict(), &tr );
UTIL_SetOrigin( this, tr.vecEndPos );
pev->angles = pev->v_angle = UTIL_VecToAngles( tr.vecEndPos - pev->origin );
}
These two lines were removed (as they are repeated later in the method).
Should be:
return save.WriteFields( "cPLAYER", "PLAYER", this, m_playerSaveData, ARRAYSIZE(m_playerSaveData) );
SOHL adds an extra check:
void CBasePlayer :: FlashlightTurnOff( void )
{
if (FlashlightIsOn())
EMIT_SOUND_DYN( ENT(pev), CHAN_WEAPON, SOUND_FLASHLIGHT_OFF, 1.0, ATTN_NORM, 0, PITCH_NORM );
Should be:
void CBasePlayer :: EnableControl(BOOL fControl)
{
if (!fControl)
{
pev->flags |= FL_FROZEN;
pev->velocity = g_vecZero; //LRC - stop view bobbing
}
else
pev->flags &= ~FL_FROZEN;
}
HL-U doesn't have the m_flSoundDelay = 1.5;
part of this. Is it a problem with HL-U?
Also, it doesn't have this code either:
Both these WriteFunctions
should have void **value
instead of const int *value
.
SOHL updates this to:
if (pev->targetname)\
return save.WriteFields( STRING(pev->targetname), #derivedClass, this, m_SaveData, ARRAYSIZE(m_SaveData) );\
else\
return save.WriteFields( STRING(pev->classname), #derivedClass, this, m_SaveData, ARRAYSIZE(m_SaveData) );\
Should be:
PlaySentence( m_szGrp[TLK_DECLINE], 2, VOL_NORM, ATTN_NORM ); //LRC
Should be:
CLIENT_COMMAND ( pClient, "cd stop\n");
SOHL changed this to:
// LRC- correct for deltas > 360
while ( delta < -180 )
delta += 360;
while ( delta > 180 )
delta -= 360;
Here's why all those other save functions didn't break. I think it's option if you want to change this or not, I don't know if the extra debugging output is too useful in SOHL.
void CSave :: WriteFunction(const char* cname, const char* pname, void** data, int count)
{
const char *functionName;
functionName = NAME_FOR_FUNCTION( (uint32)*data );
if ( functionName )
BufferField( pname, strlen(functionName) + 1, functionName );
else
ALERT( at_error, "Member \"%s\" of \"%s\" contains an invalid function pointer %p!", pname, cname, *data );
}
int CSave :: WriteEntVars( const char *pname, entvars_t *pev )
{
if (pev->targetname)
return WriteFields( STRING(pev->targetname), pname, pev, gEntvarsDescription, ENTVARS_COUNT );
else
return WriteFields( STRING(pev->classname), pname, pev, gEntvarsDescription, ENTVARS_COUNT );
}
int CSave :: WriteFields( const char *cname, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount )
WriteFunction( cname, pTest->fieldName, (void **)pOutputData, pTest->fieldSize );
SOHL also precaches the ammo_9mmbox:
UTIL_PrecacheOther( "ammo_9mmclip" );
UTIL_PrecacheOther( "ammo_9mmbox" ); //LRC
Related to the other python.cpp stuff - this field is removed in HL-U. Not sure why?
2 calls to WriteFields
in this method to be changed if you plan on adding the cname
parameter to it.
HL-U changes this to:
if(pEnt && (bAllTalk || m_pHelper->CanPlayerHearPlayer(pPlayer, (CBasePlayer*)pEnt)) )
SOHL has some extra constants here:
#define CONTENTS_TRANSLUCENT -15
//LRC
#define CONTENTS_FLYFIELD -17
#define CONTENTS_FLYFIELD_GRAVITY -18
#define CONTENTS_FOG -19
Those constants are used in a number of places in pm_shared and are missing.
Alo missing from pm_shared is:
PM_PlayGroupSound
from the SOHL code)That's it - all the other differences I could find were minor and not important (e.g. at_console
vs. at_debug
). Sorry for the spam!
That's great of you, I find it very exciting to see what other changes have been made.
I think they are very useful, some of these changes I noticed and should be included in the source code.
This is not 'spam' - this is 'not enough'. :D
I'll take a look at each of these sometime in January, as I am in a bit of a clutch right now, juggling between high school and a game project.
I compared your branch to my own version of SOHL 1.2 to see if either of us made any mistakes when doing the conversions - here are the results. I'm not sure if all of these are bugs, so please take a look at each one to see what you think. There are a LOT, so I'll split them into multiple comments and check them off (I added convenient checkboxes) when you're happy with them.
Client code
https://github.com/Admer456/halflife-vs2019-sohl12/blob/b1d31df42eee84d68f612e7e7d5a0f898cde56b1/cl_dll/ammo.cpp#L537-L539 Should be:
https://github.com/Admer456/halflife-vs2019-sohl12/blob/b1d31df42eee84d68f612e7e7d5a0f898cde56b1/cl_dll/ammo.cpp#L627
In halflife-updated this is check is not performed - it always sets the crosshair and doesn't look at
m_iHideHUDDisplay
. Not sure if this one is a bug in halflife-updated or not.https://github.com/Admer456/halflife-vs2019-sohl12/blob/b1d31df42eee84d68f612e7e7d5a0f898cde56b1/cl_dll/geiger.cpp#L71-L78
The
if (m_iGeigerRange > 800)
condition does not exist in halflife-updated or SOHL. I don't think this code would ever run because of theif (m_iGeigerRange <= 800 && m_iGeigerRange > 0)
condition, anyway.https://github.com/Admer456/halflife-vs2019-sohl12/blob/b1d31df42eee84d68f612e7e7d5a0f898cde56b1/cl_dll/hud_spectator.cpp#L1560
Should be:
https://github.com/Admer456/halflife-vs2019-sohl12/blob/b1d31df42eee84d68f612e7e7d5a0f898cde56b1/cl_dll/hl/hl_weapons.cpp#L628-L635
This method doesn't exist in HL-U.