Mircea Kitsune [Sat, 12 Feb 2011 00:55:08 +0000 (02:55 +0200)]
Actually, that check is not needed at all. If we're holding a weapon we can reload, it means we're already reloading it, which means it's already being checked :)
Mircea Kitsune [Fri, 11 Feb 2011 23:53:19 +0000 (01:53 +0200)]
Only for bots skill 5 and up. Since only such both can reload weapons in their inventory idly, so not switching to unloaded weapons for lower skills would cause them to never reload their guns. This also makes bots more stupid at lower skills, causing them to switch to guns they'll then have to reload during fighting.
Mircea Kitsune [Fri, 11 Feb 2011 23:44:24 +0000 (01:44 +0200)]
Only refuse reload scheduled weapons if we have something else to switch to. If we somehow have no other weapon we can use, switch to anything even during combat.
Mircea Kitsune [Fri, 11 Feb 2011 22:49:30 +0000 (00:49 +0200)]
Remove the first code. Now that bots know how to reload their weapons during brakes, it might be less intelligent to not switch while reloading during combat.
Mircea Kitsune [Fri, 11 Feb 2011 22:28:01 +0000 (00:28 +0200)]
Improve that last code. When not attacking, a bot will switch to all weapons that are not fully loaded, and attempt to reload them, to keep them ready.
Mircea Kitsune [Fri, 11 Feb 2011 21:35:43 +0000 (23:35 +0200)]
Ok, let's do a few changes to the bot AI too. Bots should not switch weapons while reloading. Since not being very intelligent, they will end up with lots of unloaded weapons they'll keep switching between, not getting to shoot many of them at all.
Mircea Kitsune [Fri, 11 Feb 2011 20:29:46 +0000 (22:29 +0200)]
Error case: Skip reloading and warn if attempting to reload a weapon that does not have WEP_FLAG_RELOADABLE. Useful for players that make new weapons, if they ever forget to add it.
Mircea Kitsune [Fri, 11 Feb 2011 20:09:05 +0000 (22:09 +0200)]
Do not set ATTACK_FINISHED in reload code any more. This causes annoying delays if eg: You start reloading a weapon, then quickly switch to another weapon and back to it. Reloading is then canceled, but the 2 second reload time is still there, so your weapon is delayed for 2 seconds without reason.
Mircea Kitsune [Fri, 11 Feb 2011 16:57:32 +0000 (18:57 +0200)]
Set self.current_ammo in each weapon's WR_SETUP stage. That way, this float can be used for many things throughout the code, and is always updated. Not fully finished.
Mircea Kitsune [Thu, 10 Feb 2011 18:22:52 +0000 (20:22 +0200)]
After intensively testing the code today, and not receiving any complaints for weeks, I'm concluding this feature is finished. Revert reload settings to default balance, and mark the code as ready to merge on my end.
Samual [Tue, 8 Feb 2011 06:12:42 +0000 (01:12 -0500)]
Disable HLAC as I want to replace it with a lightning gun, and also add zoom to sniper rifle secondary as IT IS A SNIPER. If any weapon makes the most sense with zoom on secondary, this one does.
Samual [Tue, 8 Feb 2011 05:56:24 +0000 (00:56 -0500)]
Make it so that minelayer shows up in g_weaponarena "most" -- fix the comments in the code -- change the mine firing spped and lifetime (for now 10 second lifetime, maybe in the future it will be longer)
terencehill [Mon, 7 Feb 2011 18:05:49 +0000 (19:05 +0100)]
Fix Map Info dialog can be opened by pressing ENTER in the map list if there are no maps for the current gametype
This bug fix also disables other keys when there are no maps as there's nothing to do
Samual [Mon, 7 Feb 2011 07:49:37 +0000 (02:49 -0500)]
Some quick work on a feature for the minelayer which plays a sound at the end of its lifetime, this way you can have e.g. a countdown of its death alerting you it's going to die.
Samual [Thu, 3 Feb 2011 21:18:44 +0000 (16:18 -0500)]
Some force updates and some mortar balance changes... it was way overpowered before. Also: Lets remove the hagar (g_start_weapon) and take its secondary and place it on the crylink. This needs more work (hagar secondary on crylink) but should be an improvement from how it's done now.
terencehill [Wed, 2 Feb 2011 17:25:04 +0000 (18:25 +0100)]
Fix length of some sliders in 2 panel dialogs, value field text was unreadable because too much compressed
These sliders were added to the menu intentionally with a minor size to reduce graphical slider length and let value field text overflow to occupy more space. With the "compact text" system this hack made things worse.
Mircea Kitsune [Mon, 31 Jan 2011 22:38:27 +0000 (00:38 +0200)]
Add a "teamspawns" and "noteamspawns" feature to gametypefilter. I believe this is useful for maps that filter entities when team spawns are used. It can avoid adding each gametype manually in entities, and updating maps if a gametype is changed or added in Xonotic. I know about the "teams" and "noteams" switch, but these ignore team games that don't use team spawns and therefore a red / blue base (like TDM or DOM).
Mircea Kitsune [Sun, 30 Jan 2011 20:56:30 +0000 (22:56 +0200)]
Fix laser setting the last used ammo to 1 when reloading it after having switched to another weapon. We need to use a field float there that is always 0, or the ..float sets the last ammo instead of reporting no ammo.