Fix convoy coordination, AI combat and spectator recovery

This commit is contained in:
2026-09-27 22:28:07 +02:00
parent 2551d171b3
commit c5629f7f4f
108 changed files with 4337 additions and 282 deletions
+3 -1
View File
@@ -6,8 +6,10 @@ firearm=body(core/'ERR_UnconsciousWeapon.c','static bool Firearm(').replace('EWe
run('''#include <cassert>
#include <initializer_list>
namespace EWeaponType {enum{WT_NONE,WT_RIFLE,WT_GRENADELAUNCHER,WT_SNIPERRIFLE,WT_ROCKETLAUNCHER,WT_MACHINEGUN,WT_HANDGUN,WT_FRAGGRENADE,WT_SMOKEGRENADE,WT_AUTOCANNON,WT_COUNT};}
'''+cycle+firearm+'''
'''+cycle+body(core/'ERR_Observer.c','static bool Toggle(')+firearm+'''
int main(){
for(bool enabled:{false,true})for(bool pressed:{false,true})for(bool previous:{false,true})
assert(Toggle(enabled,pressed,previous)==(enabled&&pressed&&!previous));
assert(Cycle(true,true,false,false,false)==-1);
assert(Cycle(true,false,true,false,false)==1);
assert(Cycle(true,true,false,true,false)==0); // held arrow does not repeat