Lachara_43 I was able to add failsafes to 100% block aim assist when player IsMeleeing(), IsThrowingGrenade(), isSwitchingWeapons(), or holding an invalid weapon that doesn't have ADS. These were all pretty easy, the first 3 have simple engine functions you can use, and the last one I suggest just making an if statement at the very top of the loop with a function that you returns 0 if player is holding betties, perks, grenade launcher, etc. and returns 1 otherwise.
For reloading, this was a bit tricky because there is no IsReloading() in WaW, simply add a variable check for self.is_reloading == false and then thread this function as part of your aim assist init:
is_reloading_checker()
{
level endon("end_game");
self endon("disconnect");
self endon("death");
for(;;)
{
self.is_reloading = false;
self waittill( "reload_start" );
if(GetDvar( "aim_assist_lock" ) != "1")
{
wait(1);
continue;
}
weap = self getCurrentWeapon();
while( (self GetWeaponAmmoClip( weap ) != WeaponClipSize( weap ) && self GetWeaponAmmoStock( weap ) != 0 ) && !self isMeleeing() && !self IsThrowingGrenade() && !self isSwitchingWeapons() ) // if we switch weps, throw grenade, or melee we cancel reload
{
self.is_reloading = true;
wait(0.5);
}
}
}
I also cleaned it up a bit and I am now implementing a toggle that will work on co-op, because as it stands remember that GetDvar() will always just returns the value of the host. I added an aim assist button to Game Options and found a way to send a menu script response to GSC which will either kill all aim assist functions or thread the aim assist functions to begin them. Still have a few kinks to work out but my modification of this aim assist script will be implemented into my WAW zombies remaster mod, with credit given.