Skip to content

Commit 6fae778

Browse files
Note invalid return type
1 parent ea71ddf commit 6fae778

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

sp/src/game/shared/mapbase/vscript_funcs_shared.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,9 @@ struct ScriptEmitSound_t : public EmitSound_t
250250
float GetSoundTime() { return m_flSoundTime; }
251251
void SetSoundTime( float flSoundTime ) { m_flSoundTime = flSoundTime; }
252252

253+
// NOTE: Incorrectly returns float for boolean type.
254+
// Fixing this would break scripts explicitly comparing against 0 or 1 or variables that store the results
255+
// Keeping this would prevent implicit falseness check in a language such as Lua where 0.0 is truthy
253256
float GetEmitCloseCaption() { return m_bEmitCloseCaption; }
254257
void SetEmitCloseCaption( bool bEmitCloseCaption ) { m_bEmitCloseCaption = bEmitCloseCaption; }
255258

0 commit comments

Comments
 (0)