Re: ssgm pistol ammo fix [message #446350 is a reply to message #446304] |
Fri, 29 April 2011 04:30 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to previous message](/theme/Renegade_Forums/images/down.png) |
iRANian
Messages: 4311 Registered: April 2011
Karma:
|
General (4 Stars) |
|
|
The sentences you quoted refer to two different things, without the loop the ammo gets set to the no-reload behavior you normally see on sniper servers. the "ammo not refilling when you refill" is a bug with the normal code that makes refilling not do aynthing for the pistol.
I honestly have no idea what the refill code is doing, but with all the settings I tried (this includes setting MaxInventory, either ammo is set to no-reload on spawn, on refill, or both). There was also a bug that made the current clip ammo get set to 0 after reloading thus it was endlessly looping. Are you saying you got it working without the timer loop? If not, try running the code without the loop, dunno if something else is affecting it.
I can see why you would logically think setting the ammo isn't required, but the engine/server behavior for weapons like the pistol is incredibly buggy and I made this fix after trying out four variables for a few hours.
this code should work on all weapons like the pistol (ClipSize not -1, MaxInventory -1). It could be optimized by triggering the refill specific code by detecting refills, but I haven't found a way to detect refills yet.
Long time and well respected Renegade community member, programmer, modder and tester.
Scripts 4.0 private beta tester since May 2011.
My Renegade server plugins releases
[Updated on: Fri, 29 April 2011 04:41] Report message to a moderator
|
|
|