Fix convoy coordination, AI combat and spectator recovery
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user