iw5: more cursed macros (#2)
All checks were successful
Build / build-linux (push) Successful in 7s

This commit is contained in:
6arelyFuture 2024-03-21 09:28:02 +00:00
parent f1406bfb4f
commit 88d6e6add8
4 changed files with 23 additions and 11 deletions

View File

@ -9,6 +9,7 @@ cd ..
# ready for release # ready for release
cp iw4/scripts/mp/_jump.gsc build/iw4 cp iw4/scripts/mp/_jump.gsc build/iw4
echo "Created release for IW4"
# replace gsc extension with c. It will make gcc very happy # replace gsc extension with c. It will make gcc very happy
mv iw5/scripts/mp/_jump.gsc iw5/scripts/mp/_jump.c mv iw5/scripts/mp/_jump.gsc iw5/scripts/mp/_jump.c
@ -21,3 +22,4 @@ python3 .gitea/scripts/clean.py _jump.in _jump.gsc
# ready for release # ready for release
mv _jump.gsc build/iw5/_jump.gsc mv _jump.gsc build/iw5/_jump.gsc
echo "Created release for IW5"

View File

@ -15,7 +15,7 @@ jobs:
- name: Create release - name: Create release
run: | run: |
.gitea/scripts/ci.sh bash -e .gitea/scripts/ci.sh
- name: Upload release - name: Upload release
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3

View File

@ -30,7 +30,8 @@ _ON_PLAYER_CNCT_BEGIN
player thread jumper(); player thread jumper();
player thread displaySpeed(); player thread displaySpeed();
player thread onPlayerSpawned();
_ON_PLAYER_SPAWNED_COROUTINE( player );
_ON_PLAYER_CNCT_END _ON_PLAYER_CNCT_END
@ -119,14 +120,8 @@ jumper()
} }
} }
onPlayerSpawned() _ON_PLAYER_SPAWNED_BEGIN
{
GENERIC_COROUTINE_END;
while ( true )
{
self waittill( "spawned_player" );
self setPerk( "specialty_marathon", true, false ); self setPerk( "specialty_marathon", true, false );
}
} _ON_PLAYER_SPAWNED_END

View File

@ -55,6 +55,21 @@
} \ } \
} }
#define _ON_PLAYER_SPAWNED_COROUTINE(ent) \
ent thread onPlayerSpawned()
/* Captures a "spawned" event. Perform your action(s) using the "self" variable */
#define _ON_PLAYER_SPAWNED_BEGIN onPlayerSpawned() \
{ \
GENERIC_COROUTINE_END \
while ( true ) \
{ \
self waittill( "spawned_player" );
#define _ON_PLAYER_SPAWNED_END \
} \
}
/* IW4x MP has printConsole Built-in. __VA_OPT__ requires C++20 compliant preprocessor */ /* IW4x MP has printConsole Built-in. __VA_OPT__ requires C++20 compliant preprocessor */
/* Do not use the + to concatenate strings, let the GSC VM do it for you */ /* Do not use the + to concatenate strings, let the GSC VM do it for you */
/* Other clients will have print available */ /* Other clients will have print available */