mirror of
https://github.com/ineedbots/iw3_bot_warfare.git
synced 2025-04-19 17:32:54 +00:00
fmt
This commit is contained in:
parent
8acd9a282e
commit
541b0832e3
14
.astylerc
14
.astylerc
@ -1,21 +1,27 @@
|
|||||||
# try to mimic the original gsc provided
|
# try to mimic the original gsc provided
|
||||||
|
# mode=ghc
|
||||||
mode=c
|
mode=c
|
||||||
style=allman
|
style=allman
|
||||||
|
|
||||||
indent=tab
|
indent=force-tab=2
|
||||||
lineend=windows
|
lineend=windows
|
||||||
|
|
||||||
pad-oper
|
pad-oper
|
||||||
pad-paren-in
|
pad-paren-in
|
||||||
pad-header
|
pad-header
|
||||||
|
# pad-brackets-in
|
||||||
# delete-empty-lines
|
fill-empty-lines
|
||||||
|
squeeze-lines=2
|
||||||
|
squeeze-ws
|
||||||
|
break-one-line-headers
|
||||||
|
add-braces
|
||||||
|
remove-comment-prefix
|
||||||
|
|
||||||
break-blocks
|
break-blocks
|
||||||
# remove-braces
|
|
||||||
|
|
||||||
indent-switches
|
indent-switches
|
||||||
indent-cases
|
indent-cases
|
||||||
indent-after-parens
|
indent-after-parens
|
||||||
|
indent-col1-comments
|
||||||
|
|
||||||
remove-comment-prefix
|
remove-comment-prefix
|
||||||
|
@ -4,7 +4,7 @@ root = true
|
|||||||
indent_style = tab
|
indent_style = tab
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
charset = latin1
|
charset = latin1
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = false
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|
||||||
[*.md]
|
[*.md]
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
// Code Callback functions
|
// Code Callback functions
|
||||||
|
|
||||||
/*================
|
/*================
|
||||||
Called by code after the level's main script function has run.
|
Called by code after the level's main script function has run.
|
||||||
================*/
|
================*/
|
||||||
CodeCallback_StartGameType()
|
CodeCallback_StartGameType()
|
||||||
{
|
{
|
||||||
// If the gametype has not beed started, run the startup
|
// If the gametype has not beed started, run the startup
|
||||||
if(!isDefined(level.gametypestarted) || !level.gametypestarted)
|
if ( !isDefined( level.gametypestarted ) || !level.gametypestarted )
|
||||||
{
|
{
|
||||||
[[level.callbackStartGameType]]();
|
[[level.callbackStartGameType]]();
|
||||||
|
|
||||||
@ -26,71 +26,71 @@ CodeCallback_StartGameType()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*================
|
/*================
|
||||||
Called when a player begins connecting to the server.
|
Called when a player begins connecting to the server.
|
||||||
Called again for every map change or tournement restart.
|
Called again for every map change or tournement restart.
|
||||||
|
|
||||||
Return undefined if the client should be allowed, otherwise return
|
Return undefined if the client should be allowed, otherwise return
|
||||||
a string with the reason for denial.
|
a string with the reason for denial.
|
||||||
|
|
||||||
Otherwise, the client will be sent the current gamestate
|
Otherwise, the client will be sent the current gamestate
|
||||||
and will eventually get to ClientBegin.
|
and will eventually get to ClientBegin.
|
||||||
|
|
||||||
firstTime will be qtrue the very first time a client connects
|
firstTime will be qtrue the very first time a client connects
|
||||||
to the server machine, but qfalse on map changes and tournement
|
to the server machine, but qfalse on map changes and tournement
|
||||||
restarts.
|
restarts.
|
||||||
================*/
|
================*/
|
||||||
CodeCallback_PlayerConnect()
|
CodeCallback_PlayerConnect()
|
||||||
{
|
{
|
||||||
self endon("disconnect");
|
self endon( "disconnect" );
|
||||||
[[level.callbackPlayerConnect]]();
|
[[level.callbackPlayerConnect]]();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*================
|
/*================
|
||||||
Called when a player drops from the server.
|
Called when a player drops from the server.
|
||||||
Will not be called between levels.
|
Will not be called between levels.
|
||||||
self is the player that is disconnecting.
|
self is the player that is disconnecting.
|
||||||
================*/
|
================*/
|
||||||
CodeCallback_PlayerDisconnect()
|
CodeCallback_PlayerDisconnect()
|
||||||
{
|
{
|
||||||
self notify("disconnect");
|
self notify( "disconnect" );
|
||||||
[[level.callbackPlayerDisconnect]]();
|
[[level.callbackPlayerDisconnect]]();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*================
|
/*================
|
||||||
Called when a player has taken damage.
|
Called when a player has taken damage.
|
||||||
self is the player that took damage.
|
self is the player that took damage.
|
||||||
================*/
|
================*/
|
||||||
CodeCallback_PlayerDamage(eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, timeOffset)
|
CodeCallback_PlayerDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, timeOffset )
|
||||||
{
|
{
|
||||||
self endon("disconnect");
|
self endon( "disconnect" );
|
||||||
[[level.callbackPlayerDamage]](eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, timeOffset);
|
[[level.callbackPlayerDamage]]( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, timeOffset );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*================
|
/*================
|
||||||
Called when a player has been killed.
|
Called when a player has been killed.
|
||||||
self is the player that was killed.
|
self is the player that was killed.
|
||||||
================*/
|
================*/
|
||||||
CodeCallback_PlayerKilled(eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration)
|
CodeCallback_PlayerKilled( eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration )
|
||||||
{
|
{
|
||||||
self endon("disconnect");
|
self endon( "disconnect" );
|
||||||
[[level.callbackPlayerKilled]](eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration);
|
[[level.callbackPlayerKilled]]( eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*================
|
/*================
|
||||||
Called when a player has been killed, but has last stand perk.
|
Called when a player has been killed, but has last stand perk.
|
||||||
self is the player that was killed.
|
self is the player that was killed.
|
||||||
================*/
|
================*/
|
||||||
CodeCallback_PlayerLastStand(eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration )
|
CodeCallback_PlayerLastStand( eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration )
|
||||||
{
|
{
|
||||||
self endon("disconnect");
|
self endon( "disconnect" );
|
||||||
[[level.callbackPlayerLastStand]](eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration );
|
[[level.callbackPlayerLastStand]]( eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
/*================
|
/*================
|
||||||
Setup any misc callbacks stuff like defines and default callbacks
|
Setup any misc callbacks stuff like defines and default callbacks
|
||||||
================*/
|
================*/
|
||||||
SetupCallbacks()
|
SetupCallbacks()
|
||||||
{
|
{
|
||||||
SetDefaultCallbacks();
|
SetDefaultCallbacks();
|
||||||
@ -106,9 +106,9 @@ SetupCallbacks()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*================
|
/*================
|
||||||
Called from the gametype script to store off the default callback functions.
|
Called from the gametype script to store off the default callback functions.
|
||||||
This allows the callbacks to be overridden by level script, but not lost.
|
This allows the callbacks to be overridden by level script, but not lost.
|
||||||
================*/
|
================*/
|
||||||
SetDefaultCallbacks()
|
SetDefaultCallbacks()
|
||||||
{
|
{
|
||||||
level.callbackStartGameType = maps\mp\gametypes\_globallogic::Callback_StartGameType;
|
level.callbackStartGameType = maps\mp\gametypes\_globallogic::Callback_StartGameType;
|
||||||
@ -120,11 +120,11 @@ SetDefaultCallbacks()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*================
|
/*================
|
||||||
Called when a gametype is not supported.
|
Called when a gametype is not supported.
|
||||||
================*/
|
================*/
|
||||||
AbortLevel()
|
AbortLevel()
|
||||||
{
|
{
|
||||||
println("Aborting level - gametype is not supported");
|
println( "Aborting level - gametype is not supported" );
|
||||||
|
|
||||||
level.callbackStartGameType = ::callbackVoid;
|
level.callbackStartGameType = ::callbackVoid;
|
||||||
level.callbackPlayerConnect = ::callbackVoid;
|
level.callbackPlayerConnect = ::callbackVoid;
|
||||||
@ -133,13 +133,13 @@ AbortLevel()
|
|||||||
level.callbackPlayerKilled = ::callbackVoid;
|
level.callbackPlayerKilled = ::callbackVoid;
|
||||||
level.callbackPlayerLastStand = ::callbackVoid;
|
level.callbackPlayerLastStand = ::callbackVoid;
|
||||||
|
|
||||||
setdvar("g_gametype", "dm");
|
setdvar( "g_gametype", "dm" );
|
||||||
|
|
||||||
exitLevel(false);
|
exitLevel( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*================
|
/*================
|
||||||
================*/
|
================*/
|
||||||
callbackVoid()
|
callbackVoid()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user