forward_return questions
Some forwards - many forwards - deliver many parameters. E.g.:
Code:
FM_EmitSound void (ent, iChannel, const szSample[], Float:fVolume, Float:fAttenuation, iFlags, iPitch)go about changing all the parameters in a function/method called by register_forward? Like this? Code:
Or like this? Code:
Or some way completely different? Then, what exactly is "FMV_CELL"? As far as I know there are only FMV_CELL, FMV_FLOAT and FMV_STRING, so FMV_CELL would be for integers, wouldn't it? Then, what about arrayed floats like origin[3], velocity[3], vector[3] and angles[3]? Then, as const string[] is given as a constant, can it even be changed by forward_return? Also, can a forward be executed via ExecuteForward while a forward is "in progress", as in, from within a to a forward hooked method? |
Re: forward_return questions
There is nothing to return, and you can't set params on the fly as you would do with ham.
Just send the equivalent EngFunc_XX, or emit_sound (better), with params you want, and return FMRES_SUPERCEDE. Use forward_return when the forward returns something (aka you see other thing than void before the EngFunc Code:
EngFunc_EmitSound, // void ) (edict_t *entity, int channel, const char *sample, float volume, float attenuation, int fFlags, int pitch);In that case you would use FMV_CELL because the return value is an int. |
Re: forward_return questions
Holy shit thank you so much. Works perfectly now.
Understood completely wrong what forward_return did. Thought it alters parameters, but in fact it alters the return value. So it is not possible to on-the-fly-change a forward's parameters? That somehow sucks, but thank god it is possible in ham sandwich module. I'd give you karma, but wow the system was removed? Too many flipping idiots begging for it? Oh well, thanks either way - it's the thought that counts. =) |
| All times are GMT -4. The time now is 13:53. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.