Facepunch / garrysmod-issues

Garry's Mod issue tracker
147 stars 56 forks source link

CEffectData.m_fFlags defaults to 0x3 on server and 0x0 on client #2743

Closed Kefta closed 8 years ago

Kefta commented 8 years ago
] lua_run print( EffectData():GetFlags() )
> print( EffectData():GetFlags() )...
3
] lua_run_cl print( EffectData():GetFlags() )
0

I don't know if this is a new issue, but I never noticed it being 3 serverside before.

robotboy655 commented 8 years ago

EffectData() does not create a new object every time, it reuses one object.

https://github.com/garrynewman/garrysmod/blob/0fd23135bbd94a09a194ba16bbff4c1a3a56867b/garrysmod/gamemodes/sandbox/entities/entities/gmod_emitter.lua#L182

(Updated wiki pages)

Kefta commented 8 years ago

Then the default values (at least flags since that's the only value I see people wouldn't set but could still affect the outcome) should be restored when EffectData is called

robotboy655 commented 8 years ago

Done.

Kefta commented 8 years ago

Thanks a bunch