Finish doors. Door hits all characters, check on activating team and send in snapshot only needed information
4
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
|||
.bam
|
||||
.settings
|
||||
src/game/generated
|
||||
objs
|
||||
datasrc/*.pyc
|
||||
|
@ -24,4 +25,5 @@ DDRace_Trunk_d*
|
|||
*.exe
|
||||
*.res
|
||||
*.dll
|
||||
*.patch
|
||||
*.patch
|
||||
*.prefs
|
Before Width: | Height: | Size: 282 KiB After Width: | Height: | Size: 289 KiB |
BIN
data/editor/filledentities.png
Normal file
After Width: | Height: | Size: 457 KiB |
BIN
data/mapres/bg_ddr.png
Normal file
After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 282 KiB After Width: | Height: | Size: 289 KiB |
BIN
other/icons/DDRace.ico
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
other/icons/DDRace1.ico
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
other/icons/DDRace2.ico
Normal file
After Width: | Height: | Size: 19 KiB |
|
@ -1 +1 @@
|
|||
50h ICON "teeworlds.ico"
|
||||
50h ICON "DDRace.ico"
|
||||
|
|
|
@ -50,8 +50,8 @@ public:
|
|||
|
||||
virtual void Reset()
|
||||
{
|
||||
#define MACRO_CONFIG_INT(Name,ScriptName,def,min,max,flags,desc) g_Config.m_##Name = def;
|
||||
#define MACRO_CONFIG_STR(Name,ScriptName,len,def,flags,desc) str_copy(g_Config.m_##Name, def, len);
|
||||
#define MACRO_CONFIG_INT(Name,ScriptName,def,min,max,flags,desc,Level) g_Config.m_##Name = def;
|
||||
#define MACRO_CONFIG_STR(Name,ScriptName,len,def,flags,desc,Level) str_copy(g_Config.m_##Name, def, len);
|
||||
|
||||
#include "config_variables.h"
|
||||
|
||||
|
@ -61,8 +61,8 @@ public:
|
|||
|
||||
virtual void RestoreStrings()
|
||||
{
|
||||
#define MACRO_CONFIG_INT(Name,ScriptName,def,min,max,flags,desc) // nop
|
||||
#define MACRO_CONFIG_STR(Name,ScriptName,len,def,flags,desc) if(!g_Config.m_##Name[0] && def[0]) str_copy(g_Config.m_##Name, def, len);
|
||||
#define MACRO_CONFIG_INT(Name,ScriptName,def,min,max,flags,desc,Level) // nop
|
||||
#define MACRO_CONFIG_STR(Name,ScriptName,len,def,flags,desc,Level) if(!g_Config.m_##Name[0] && def[0]) str_copy(g_Config.m_##Name, def, len);
|
||||
|
||||
#include "config_variables.h"
|
||||
|
||||
|
@ -82,8 +82,8 @@ public:
|
|||
char aLineBuf[1024*2];
|
||||
char aEscapeBuf[1024*2];
|
||||
|
||||
#define MACRO_CONFIG_INT(Name,ScriptName,def,min,max,flags,desc) if((flags)&CFGFLAG_SAVE){ str_format(aLineBuf, sizeof(aLineBuf), "%s %i", #ScriptName, g_Config.m_##Name); WriteLine(aLineBuf); }
|
||||
#define MACRO_CONFIG_STR(Name,ScriptName,len,def,flags,desc) if((flags)&CFGFLAG_SAVE){ EscapeParam(aEscapeBuf, g_Config.m_##Name, sizeof(aEscapeBuf)); str_format(aLineBuf, sizeof(aLineBuf), "%s \"%s\"", #ScriptName, aEscapeBuf); WriteLine(aLineBuf); }
|
||||
#define MACRO_CONFIG_INT(Name,ScriptName,def,min,max,flags,desc,Level) if((flags)&CFGFLAG_SAVE){ str_format(aLineBuf, sizeof(aLineBuf), "%s %i", #ScriptName, g_Config.m_##Name); WriteLine(aLineBuf); }
|
||||
#define MACRO_CONFIG_STR(Name,ScriptName,len,def,flags,desc,Level) if((flags)&CFGFLAG_SAVE){ EscapeParam(aEscapeBuf, g_Config.m_##Name, sizeof(aEscapeBuf)); str_format(aLineBuf, sizeof(aLineBuf), "%s \"%s\"", #ScriptName, aEscapeBuf); WriteLine(aLineBuf); }
|
||||
|
||||
#include "config_variables.h"
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
struct CConfiguration
|
||||
{
|
||||
#define MACRO_CONFIG_INT(Name,ScriptName,Def,Min,Max,Save,Desc) int m_##Name;
|
||||
#define MACRO_CONFIG_STR(Name,ScriptName,Len,Def,Save,Desc) char m_##Name[Len]; // Flawfinder: ignore
|
||||
#define MACRO_CONFIG_INT(Name,ScriptName,Def,Min,Max,Save,Desc,Level) int m_##Name;
|
||||
#define MACRO_CONFIG_STR(Name,ScriptName,Len,Def,Save,Desc,Level) char m_##Name[Len]; // Flawfinder: ignore
|
||||
#include "config_variables.h"
|
||||
#undef MACRO_CONFIG_INT
|
||||
#undef MACRO_CONFIG_STR
|
||||
|
|
|
@ -6,125 +6,126 @@
|
|||
#include "././game/variables.h"
|
||||
/* DDRace Server*/
|
||||
//===============================
|
||||
MACRO_CONFIG_INT(SvShotgunBulletSound, sv_shotgun_bullet_sound, 0, 0, 1, CFGFLAG_SERVER, "Annoying Shotgun sound on/off")
|
||||
MACRO_CONFIG_INT(SvEndlessSuperHook, sv_endless_super_hook, 0, 0, 1, CFGFLAG_SERVER, "Endless hook for super players on/off")
|
||||
MACRO_CONFIG_INT(SvEmotionalTees, sv_emotional_tees, 1, 0, 1, CFGFLAG_SERVER, "Emotional Tees on/off")
|
||||
MACRO_CONFIG_INT(SvReconnectTime,sv_reconnect_time,5,0,9999,CFGFLAG_SERVER,"how much time between leaves and joins")
|
||||
MACRO_CONFIG_INT(SvVoteKickTimeDelay,sv_vote_kick_delay,0,0,9999,CFGFLAG_SERVER,"how much time between kick votes")
|
||||
MACRO_CONFIG_INT(SvVoteKickBanTime,sv_vote_kick_bantime, 300, 0, 9999, CFGFLAG_SERVER," ")
|
||||
MACRO_CONFIG_INT(SvVoteMapTimeDelay,sv_vote_map_delay,0,0,9999,CFGFLAG_SERVER,"how much time between map votes")
|
||||
MACRO_CONFIG_INT(SvMaxAfkTime,sv_max_afk_time, 0, 0, 9999, CFGFLAG_SERVER, "How many seconds a player is allowed to be afk, 0=disabled")
|
||||
MACRO_CONFIG_INT(SvPauseable, sv_pauseable, 1, 0, 1, CFGFLAG_SERVER, "players can pause their char or not")
|
||||
MACRO_CONFIG_INT(SvCheatTime, sv_cheattime, 0, 0, 1, CFGFLAG_SERVER, "players can cheat with time or not")
|
||||
MACRO_CONFIG_INT(SvHit, sv_hit, 1, 0, 1, CFGFLAG_SERVER, "players can hammer/grenade/laser one another")
|
||||
MACRO_CONFIG_INT(SvTunes, sv_tunes, 1, 0, 1, CFGFLAG_SERVER, "Turns Tuning On/Off")
|
||||
MACRO_CONFIG_INT(SvPhook, sv_phook, 1, 0, 1, CFGFLAG_SERVER, "Turns Player On/Off")
|
||||
MACRO_CONFIG_INT(SvNpc, sv_npc, 0, 0, 1, CFGFLAG_SERVER, "Turns NPC (No Player Collision) On/Off")
|
||||
MACRO_CONFIG_INT(SvEndlessDrag, sv_endless_drag, 0, 0, 1, CFGFLAG_SERVER, "Turns Endless hooking On/Off")
|
||||
MACRO_CONFIG_INT(SvCheats, sv_cheats, 0, 0, 1, CFGFLAG_SERVER, "Turns Cheats On/Off")
|
||||
MACRO_CONFIG_INT(SvAllowColorChange, sv_allow_color_change, 1, 0, 1, CFGFLAG_SERVER, "Allow color change (can block rainbowmod)")
|
||||
MACRO_CONFIG_INT(SvRconTries, sv_rcon_tries, 5, 0, 100, CFGFLAG_SERVER, "How Many Password Tries Before ban")
|
||||
MACRO_CONFIG_INT(SvRconTriesBantime, sv_rcon_tries_bantime, 300, 0, 9999, CFGFLAG_SERVER, "How Much time will the brute rcon password attacker will be banned")
|
||||
MACRO_CONFIG_STR(SvBroadcast, sv_broadcast, 64, "DDRace.info", CFGFLAG_SERVER, "broadcasting message")
|
||||
MACRO_CONFIG_STR(SvWelcome, sv_welcome, 64, "", CFGFLAG_SERVER, "message which players see when joining server")
|
||||
MACRO_CONFIG_INT(SvVotes, sv_votes, 1, 0, 1, CFGFLAG_SERVER, "")
|
||||
MACRO_CONFIG_INT(SvHideScore, sv_hide_score, 0, 0, 1, CFGFLAG_SERVER, "")
|
||||
MACRO_CONFIG_STR(SvRconPasswordAdmin, sv_rcon_password_admin, 32, "", CFGFLAG_SERVER, "Remote console administrator password")
|
||||
MACRO_CONFIG_STR(SvRconPasswordModer, sv_rcon_password_moder, 32, "", CFGFLAG_SERVER, "Remote console moderator password")
|
||||
MACRO_CONFIG_STR(SvRconPasswordHelper, sv_rcon_password_helper, 32, "", CFGFLAG_SERVER, "Remote console helper password")
|
||||
MACRO_CONFIG_INT(SvNetmsgLimit, sv_netmsg_limit, 0, 0, 100, CFGFLAG_SERVER, "How Many unauthed Command Tries Before ban")
|
||||
MACRO_CONFIG_INT(SvNetmsgBanTime, sv_netmsg_bantime, 300, 0, 9999, CFGFLAG_SERVER, "How Much time will the unauthed rcon command spammer will be banned")
|
||||
MACRO_CONFIG_INT(SvTimer, sv_timer, 0, 0, 1, CFGFLAG_SERVER, "Turns command timer On/Off")
|
||||
MACRO_CONFIG_INT(SvWarmup, sv_warmup, 0, 0, 30, CFGFLAG_SERVER, "Number of seconds to do warpup before round starts")
|
||||
MACRO_CONFIG_STR(SvMotd, sv_motd, 900, "", CFGFLAG_SERVER, "Message of the day to display for the clients")
|
||||
MACRO_CONFIG_INT(SvTournamentMode, sv_tournament_mode, 0, 0, 1, CFGFLAG_SERVER, "Tournament mode. When enabled, players joins the server as spectator")
|
||||
MACRO_CONFIG_INT(SvSpamprotection, sv_spamprotection, 1, 0, 1, CFGFLAG_SERVER, "Spam protection")
|
||||
MACRO_CONFIG_INT(SvSpectatorSlots, sv_spectator_slots, 0, 0, MAX_CLIENTS, CFGFLAG_SERVER, "Number of slots to reserve for spectators")
|
||||
MACRO_CONFIG_INT(SvVoteKick, sv_vote_kick, 1, 0, 1, CFGFLAG_SERVER, "Allow voting to kick players")
|
||||
MACRO_CONFIG_INT(SvVoteKickBantime, sv_vote_kick_bantime, 300, 0, 1000000, CFGFLAG_SERVER, "The time to ban a player if kicked by vote. 0 makes it just use kick")
|
||||
MACRO_CONFIG_INT(SvReservedSlots, sv_reserved_slots, 0, 0, 16, CFGFLAG_SERVER, "")
|
||||
MACRO_CONFIG_STR(SvReservedSlotsPass, sv_reserved_slots_pass, 32, "", CFGFLAG_SERVER, "")
|
||||
MACRO_CONFIG_STR(SvName, sv_name, 128, "DDRace Test Server", CFGFLAG_SERVER, "Server name")
|
||||
MACRO_CONFIG_STR(SvBindaddr, sv_bindaddr, 128, "", CFGFLAG_SERVER, "Address to bind the server to")
|
||||
MACRO_CONFIG_INT(SvPort, sv_port, 8303, 0, 0, CFGFLAG_SERVER, "Port to use for the server")
|
||||
MACRO_CONFIG_INT(SvExternalPort, sv_external_port, 0, 0, 0, CFGFLAG_SERVER, "External port to report to the master servers")
|
||||
MACRO_CONFIG_STR(SvMap, sv_map, 128, "Test", CFGFLAG_SERVER, "Map to use on the server")
|
||||
MACRO_CONFIG_INT(SvMaxClients, sv_max_clients, 16, 1, MAX_CLIENTS, CFGFLAG_SERVER, "Maximum number of clients that are allowed on a server")
|
||||
MACRO_CONFIG_INT(SvMaxClientsPerIP, sv_max_clients_per_ip, 2, 1, MAX_CLIENTS, CFGFLAG_SERVER, "Maximum number of clients with the same IP that can connect to the server")
|
||||
MACRO_CONFIG_INT(SvHighBandwidth, sv_high_bandwidth, 0, 0, 1, CFGFLAG_SERVER, "Use high bandwidth mode. Doubles the bandwidth required for the server. LAN use only")
|
||||
MACRO_CONFIG_INT(SvRegister, sv_register, 1, 0, 1, CFGFLAG_SERVER, "Register server with master server for public listing")
|
||||
MACRO_CONFIG_INT(SvScoreIP, sv_score_ip, 1, 0, 1, CFGFLAG_SERVER, "Check score for ip, too")
|
||||
MACRO_CONFIG_INT(SvCheckpointSave, sv_checkpoint_save, 1, 0, 1, CFGFLAG_SERVER, "Save checkpoint times to score file")
|
||||
MACRO_CONFIG_STR(SvScoreFolder, sv_score_folder, 32, "records", CFGFLAG_SERVER, "Folder to save score files to")
|
||||
MACRO_CONFIG_INT(SvUseSQL, sv_use_sql, 0, 0, 1, CFGFLAG_SERVER, "Enables SQL DB instead of record file")
|
||||
MACRO_CONFIG_INT(SvTeams, sv_teams, 1, 0, 1, CFGFLAG_SERVER, "Should the sub mod Teams be enabled or not",3)
|
||||
MACRO_CONFIG_INT(SvShotgunBulletSound, sv_shotgun_bullet_sound, 0, 0, 1, CFGFLAG_SERVER, "Annoying Shotgun sound on/off",3)
|
||||
MACRO_CONFIG_INT(SvEndlessSuperHook, sv_endless_super_hook, 0, 0, 1, CFGFLAG_SERVER, "Endless hook for super players on/off",3)
|
||||
MACRO_CONFIG_INT(SvEmotionalTees, sv_emotional_tees, 1, 0, 1, CFGFLAG_SERVER, "Emotional Tees on/off",3)
|
||||
MACRO_CONFIG_INT(SvReconnectTime,sv_reconnect_time,5,0,9999,CFGFLAG_SERVER,"how much time between leaves and joins",3)
|
||||
MACRO_CONFIG_INT(SvVoteKickTimeDelay,sv_vote_kick_delay,0,0,9999,CFGFLAG_SERVER,"how much time between kick votes",3)
|
||||
MACRO_CONFIG_INT(SvVoteKickBanTime,sv_vote_kick_bantime, 300, 0, 9999, CFGFLAG_SERVER," ",3)
|
||||
MACRO_CONFIG_INT(SvVoteMapTimeDelay,sv_vote_map_delay,0,0,9999,CFGFLAG_SERVER,"how much time between map votes",3)
|
||||
MACRO_CONFIG_INT(SvMaxAfkTime,sv_max_afk_time, 0, 0, 9999, CFGFLAG_SERVER, "How many seconds a player is allowed to be afk, 0=disabled",3)
|
||||
MACRO_CONFIG_INT(SvPauseable, sv_pauseable, 1, 0, 1, CFGFLAG_SERVER, "players can pause their char or not",3)
|
||||
MACRO_CONFIG_INT(SvCheatTime, sv_cheattime, 0, 0, 1, CFGFLAG_SERVER, "players can cheat with time or not",3)
|
||||
MACRO_CONFIG_INT(SvHit, sv_hit, 1, 0, 1, CFGFLAG_SERVER, "players can hammer/grenade/laser one another",3)
|
||||
MACRO_CONFIG_INT(SvTunes, sv_tunes, 1, 0, 1, CFGFLAG_SERVER, "Turns Tuning On/Off",3)
|
||||
MACRO_CONFIG_INT(SvPhook, sv_phook, 1, 0, 1, CFGFLAG_SERVER, "Turns Player On/Off",3)
|
||||
MACRO_CONFIG_INT(SvNpc, sv_npc, 0, 0, 1, CFGFLAG_SERVER, "Turns NPC (No Player Collision) On/Off",3)
|
||||
MACRO_CONFIG_INT(SvEndlessDrag, sv_endless_drag, 0, 0, 1, CFGFLAG_SERVER, "Turns Endless hooking On/Off",3)
|
||||
MACRO_CONFIG_INT(SvCheats, sv_cheats, 0, 0, 1, CFGFLAG_SERVER, "Turns Cheats On/Off",4)
|
||||
MACRO_CONFIG_INT(SvAllowColorChange, sv_allow_color_change, 1, 0, 1, CFGFLAG_SERVER, "Allow color change (can block rainbowmod)",3)
|
||||
MACRO_CONFIG_INT(SvRconTries, sv_rcon_tries, 5, 0, 100, CFGFLAG_SERVER, "How Many Password Tries Before ban",3)
|
||||
MACRO_CONFIG_INT(SvRconTriesBantime, sv_rcon_tries_bantime, 300, 0, 9999, CFGFLAG_SERVER, "How Much time will the brute rcon password attacker will be banned",3)
|
||||
MACRO_CONFIG_STR(SvBroadcast, sv_broadcast, 64, "DDRace.info", CFGFLAG_SERVER, "broadcasting message",3)
|
||||
MACRO_CONFIG_STR(SvWelcome, sv_welcome, 64, "", CFGFLAG_SERVER, "message which players see when joining server",3)
|
||||
MACRO_CONFIG_INT(SvVotes, sv_votes, 1, 0, 1, CFGFLAG_SERVER, "",3)
|
||||
MACRO_CONFIG_INT(SvHideScore, sv_hide_score, 0, 0, 1, CFGFLAG_SERVER, "",3)
|
||||
MACRO_CONFIG_STR(SvRconPasswordAdmin, sv_rcon_password_admin, 32, "", CFGFLAG_SERVER, "Remote console administrator password",3)
|
||||
MACRO_CONFIG_STR(SvRconPasswordModer, sv_rcon_password_moder, 32, "", CFGFLAG_SERVER, "Remote console moderator password",3)
|
||||
MACRO_CONFIG_STR(SvRconPasswordHelper, sv_rcon_password_helper, 32, "", CFGFLAG_SERVER, "Remote console helper password",3)
|
||||
MACRO_CONFIG_INT(SvNetmsgLimit, sv_netmsg_limit, 0, 0, 100, CFGFLAG_SERVER, "How Many unauthed Command Tries Before ban",3)
|
||||
MACRO_CONFIG_INT(SvNetmsgBanTime, sv_netmsg_bantime, 300, 0, 9999, CFGFLAG_SERVER, "How Much time will the unauthed rcon command spammer will be banned",3)
|
||||
MACRO_CONFIG_INT(SvTimer, sv_timer, 0, 0, 1, CFGFLAG_SERVER, "Turns command timer On/Off",3)
|
||||
MACRO_CONFIG_INT(SvWarmup, sv_warmup, 0, 0, 30, CFGFLAG_SERVER, "Number of seconds to do warpup before round starts",3)
|
||||
MACRO_CONFIG_STR(SvMotd, sv_motd, 900, "", CFGFLAG_SERVER, "Message of the day to display for the clients",3)
|
||||
MACRO_CONFIG_INT(SvTournamentMode, sv_tournament_mode, 0, 0, 1, CFGFLAG_SERVER, "Tournament mode. When enabled, players joins the server as spectator",3)
|
||||
MACRO_CONFIG_INT(SvSpamprotection, sv_spamprotection, 1, 0, 1, CFGFLAG_SERVER, "Spam protection",3)
|
||||
MACRO_CONFIG_INT(SvSpectatorSlots, sv_spectator_slots, 0, 0, MAX_CLIENTS, CFGFLAG_SERVER, "Number of slots to reserve for spectators",3)
|
||||
MACRO_CONFIG_INT(SvVoteKick, sv_vote_kick, 1, 0, 1, CFGFLAG_SERVER, "Allow voting to kick players",3)
|
||||
MACRO_CONFIG_INT(SvVoteKickBantime, sv_vote_kick_bantime, 300, 0, 1000000, CFGFLAG_SERVER, "The time to ban a player if kicked by vote. 0 makes it just use kick",3)
|
||||
MACRO_CONFIG_INT(SvReservedSlots, sv_reserved_slots, 0, 0, 16, CFGFLAG_SERVER, "",3)
|
||||
MACRO_CONFIG_STR(SvReservedSlotsPass, sv_reserved_slots_pass, 32, "", CFGFLAG_SERVER, "",3)
|
||||
MACRO_CONFIG_STR(SvName, sv_name, 128, "DDRace Test Server", CFGFLAG_SERVER, "Server name",3)
|
||||
MACRO_CONFIG_STR(SvBindaddr, sv_bindaddr, 128, "", CFGFLAG_SERVER, "Address to bind the server to",3)
|
||||
MACRO_CONFIG_INT(SvPort, sv_port, 8303, 0, 0, CFGFLAG_SERVER, "Port to use for the server",3)
|
||||
MACRO_CONFIG_INT(SvExternalPort, sv_external_port, 0, 0, 0, CFGFLAG_SERVER, "External port to report to the master servers",3)
|
||||
MACRO_CONFIG_STR(SvMap, sv_map, 128, "Test", CFGFLAG_SERVER, "Map to use on the server",3)
|
||||
MACRO_CONFIG_INT(SvMaxClients, sv_max_clients, 16, 1, MAX_CLIENTS, CFGFLAG_SERVER, "Maximum number of clients that are allowed on a server",3)
|
||||
MACRO_CONFIG_INT(SvMaxClientsPerIP, sv_max_clients_per_ip, 2, 1, MAX_CLIENTS, CFGFLAG_SERVER, "Maximum number of clients with the same IP that can connect to the server",3)
|
||||
MACRO_CONFIG_INT(SvHighBandwidth, sv_high_bandwidth, 0, 0, 1, CFGFLAG_SERVER, "Use high bandwidth mode. Doubles the bandwidth required for the server. LAN use only",3)
|
||||
MACRO_CONFIG_INT(SvRegister, sv_register, 1, 0, 1, CFGFLAG_SERVER, "Register server with master server for public listing",3)
|
||||
MACRO_CONFIG_INT(SvScoreIP, sv_score_ip, 1, 0, 1, CFGFLAG_SERVER, "Check score for ip, too",3)
|
||||
MACRO_CONFIG_INT(SvCheckpointSave, sv_checkpoint_save, 1, 0, 1, CFGFLAG_SERVER, "Save checkpoint times to score file",3)
|
||||
MACRO_CONFIG_STR(SvScoreFolder, sv_score_folder, 32, "records", CFGFLAG_SERVER, "Folder to save score files to",3)
|
||||
MACRO_CONFIG_INT(SvUseSQL, sv_use_sql, 0, 0, 1, CFGFLAG_SERVER, "Enables SQL DB instead of record file",3)
|
||||
/* SQL */
|
||||
MACRO_CONFIG_STR(SvSqlUser, sv_sql_user, 32, "nameless", CFGFLAG_SERVER, "SQL User")
|
||||
MACRO_CONFIG_STR(SvSqlPw, sv_sql_pw, 32, "tee", CFGFLAG_SERVER, "SQL Password")
|
||||
MACRO_CONFIG_STR(SvSqlIp, sv_sql_ip, 32, "127.0.0.1", CFGFLAG_SERVER, "SQL Database IP")
|
||||
MACRO_CONFIG_INT(SvSqlPort, sv_sql_port, 3306, 0, 65535, CFGFLAG_SERVER, "SQL Database port")
|
||||
MACRO_CONFIG_STR(SvSqlDatabase, sv_sql_database, 16, "teeworlds", CFGFLAG_SERVER, "SQL Database name")
|
||||
MACRO_CONFIG_STR(SvSqlPrefix, sv_sql_prefix, 16, "record", CFGFLAG_SERVER, "SQL Database table prefix")
|
||||
MACRO_CONFIG_STR(SvSqlUser, sv_sql_user, 32, "nameless", CFGFLAG_SERVER, "SQL User",3)
|
||||
MACRO_CONFIG_STR(SvSqlPw, sv_sql_pw, 32, "tee", CFGFLAG_SERVER, "SQL Password",3)
|
||||
MACRO_CONFIG_STR(SvSqlIp, sv_sql_ip, 32, "127.0.0.1", CFGFLAG_SERVER, "SQL Database IP",3)
|
||||
MACRO_CONFIG_INT(SvSqlPort, sv_sql_port, 3306, 0, 65535, CFGFLAG_SERVER, "SQL Database port",3)
|
||||
MACRO_CONFIG_STR(SvSqlDatabase, sv_sql_database, 16, "teeworlds", CFGFLAG_SERVER, "SQL Database name",3)
|
||||
MACRO_CONFIG_STR(SvSqlPrefix, sv_sql_prefix, 16, "record", CFGFLAG_SERVER, "SQL Database table prefix",3)
|
||||
//===============================
|
||||
MACRO_CONFIG_INT(SvShotgunReset, sv_shotgun_reset, 0,0,9999, CFGFLAG_SERVER, "Resets the shotgun bullets to start position")
|
||||
MACRO_CONFIG_STR(PlayerName, player_name, 24, "nameless tee", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Name of the player")
|
||||
MACRO_CONFIG_STR(ClanName, clan_name, 32, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "(not used)")
|
||||
MACRO_CONFIG_STR(Password, password, 32, "", CFGFLAG_CLIENT|CFGFLAG_SERVER, "Password to the server")
|
||||
MACRO_CONFIG_STR(Logfile, logfile, 128, "", CFGFLAG_SAVE|CFGFLAG_CLIENT|CFGFLAG_SERVER, "Filename to log all output to")
|
||||
MACRO_CONFIG_INT(ConsoleOutputLevel, console_output_level, 0, 0, 2, CFGFLAG_CLIENT|CFGFLAG_SERVER, "Adjusts the amount of information in the console")
|
||||
MACRO_CONFIG_INT(SvShotgunReset, sv_shotgun_reset, 0,0,9999, CFGFLAG_SERVER, "Resets the shotgun bullets to start position",0)
|
||||
MACRO_CONFIG_STR(PlayerName, player_name, 24, "nameless tee", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Name of the player",0)
|
||||
MACRO_CONFIG_STR(ClanName, clan_name, 32, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "(not used)",0)
|
||||
MACRO_CONFIG_STR(Password, password, 32, "", CFGFLAG_CLIENT|CFGFLAG_SERVER, "Password to the server",0)
|
||||
MACRO_CONFIG_STR(Logfile, logfile, 128, "", CFGFLAG_SAVE|CFGFLAG_CLIENT|CFGFLAG_SERVER, "Filename to log all output to",0)
|
||||
MACRO_CONFIG_INT(ConsoleOutputLevel, console_output_level, 0, 0, 2, CFGFLAG_CLIENT|CFGFLAG_SERVER, "Adjusts the amount of information in the console",0)
|
||||
|
||||
MACRO_CONFIG_INT(ClCpuThrottle, cl_cpu_throttle, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "")
|
||||
MACRO_CONFIG_INT(ClEditor, cl_editor, 0, 0, 1, CFGFLAG_CLIENT, "")
|
||||
MACRO_CONFIG_INT(ClCpuThrottle, cl_cpu_throttle, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "",0)
|
||||
MACRO_CONFIG_INT(ClEditor, cl_editor, 0, 0, 1, CFGFLAG_CLIENT, "",0)
|
||||
|
||||
MACRO_CONFIG_INT(ClEventthread, cl_eventthread, 0, 0, 1, CFGFLAG_CLIENT, "Enables the usage of a thread to pump the events")
|
||||
MACRO_CONFIG_INT(ClEventthread, cl_eventthread, 0, 0, 1, CFGFLAG_CLIENT, "Enables the usage of a thread to pump the events",0)
|
||||
|
||||
MACRO_CONFIG_INT(InpGrab, inp_grab, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Use forceful input grabbing method")
|
||||
MACRO_CONFIG_INT(InpGrab, inp_grab, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Use forceful input grabbing method",0)
|
||||
|
||||
MACRO_CONFIG_STR(BrFilterString, br_filter_string, 25, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Server browser filtering string")
|
||||
MACRO_CONFIG_STR(BrFilterString, br_filter_string, 25, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Server browser filtering string",0)
|
||||
|
||||
MACRO_CONFIG_INT(BrFilterFull, br_filter_full, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out full server in browser")
|
||||
MACRO_CONFIG_INT(BrFilterEmpty, br_filter_empty, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out empty server in browser")
|
||||
MACRO_CONFIG_INT(BrFilterPw, br_filter_pw, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out password protected servers in browser")
|
||||
MACRO_CONFIG_INT(BrFilterPing, br_filter_ping, 999, 0, 999, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Ping to filter by in the server browser")
|
||||
MACRO_CONFIG_STR(BrFilterGametype, br_filter_gametype, 128, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Game types to filter")
|
||||
MACRO_CONFIG_INT(BrFilterPure, br_filter_pure, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out non-standard servers in browser")
|
||||
MACRO_CONFIG_INT(BrFilterPureMap, br_filter_pure_map, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out non-standard maps in browser")
|
||||
MACRO_CONFIG_INT(BrFilterCompatversion, br_filter_compatversion, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out non-compatible servers in browser")
|
||||
MACRO_CONFIG_INT(BrFilterFull, br_filter_full, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out full server in browser",0)
|
||||
MACRO_CONFIG_INT(BrFilterEmpty, br_filter_empty, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out empty server in browser",0)
|
||||
MACRO_CONFIG_INT(BrFilterPw, br_filter_pw, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out password protected servers in browser",0)
|
||||
MACRO_CONFIG_INT(BrFilterPing, br_filter_ping, 999, 0, 999, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Ping to filter by in the server browser",0)
|
||||
MACRO_CONFIG_STR(BrFilterGametype, br_filter_gametype, 128, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Game types to filter",0)
|
||||
MACRO_CONFIG_INT(BrFilterPure, br_filter_pure, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out non-standard servers in browser",0)
|
||||
MACRO_CONFIG_INT(BrFilterPureMap, br_filter_pure_map, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out non-standard maps in browser",0)
|
||||
MACRO_CONFIG_INT(BrFilterCompatversion, br_filter_compatversion, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out non-compatible servers in browser",0)
|
||||
|
||||
MACRO_CONFIG_INT(BrSort, br_sort, 0, 0, 256, CFGFLAG_SAVE|CFGFLAG_CLIENT, "")
|
||||
MACRO_CONFIG_INT(BrSortOrder, br_sort_order, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "")
|
||||
MACRO_CONFIG_INT(BrMaxRequests, br_max_requests, 10, 0, 1000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Number of requests to use when refreshing server browser")
|
||||
MACRO_CONFIG_INT(BrSort, br_sort, 0, 0, 256, CFGFLAG_SAVE|CFGFLAG_CLIENT, "",0)
|
||||
MACRO_CONFIG_INT(BrSortOrder, br_sort_order, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "",0)
|
||||
MACRO_CONFIG_INT(BrMaxRequests, br_max_requests, 10, 0, 1000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Number of requests to use when refreshing server browser",0)
|
||||
|
||||
MACRO_CONFIG_INT(SndBufferSize, snd_buffer_size, 512, 0, 0, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Sound buffer size")
|
||||
MACRO_CONFIG_INT(SndRate, snd_rate, 48000, 0, 0, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Sound mixing rate")
|
||||
MACRO_CONFIG_INT(SndEnable, snd_enable, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Sound enable")
|
||||
MACRO_CONFIG_INT(SndVolume, snd_volume, 100, 0, 100, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Sound volume")
|
||||
MACRO_CONFIG_INT(SndDevice, snd_device, -1, 0, 0, CFGFLAG_SAVE|CFGFLAG_CLIENT, "(deprecated) Sound device to use")
|
||||
MACRO_CONFIG_INT(SndBufferSize, snd_buffer_size, 512, 0, 0, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Sound buffer size",0)
|
||||
MACRO_CONFIG_INT(SndRate, snd_rate, 48000, 0, 0, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Sound mixing rate",0)
|
||||
MACRO_CONFIG_INT(SndEnable, snd_enable, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Sound enable",0)
|
||||
MACRO_CONFIG_INT(SndVolume, snd_volume, 100, 0, 100, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Sound volume",0)
|
||||
MACRO_CONFIG_INT(SndDevice, snd_device, -1, 0, 0, CFGFLAG_SAVE|CFGFLAG_CLIENT, "(deprecated) Sound device to use",0)
|
||||
|
||||
MACRO_CONFIG_INT(SndNonactiveMute, snd_nonactive_mute, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "")
|
||||
MACRO_CONFIG_INT(SndNonactiveMute, snd_nonactive_mute, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "",0)
|
||||
|
||||
MACRO_CONFIG_INT(GfxScreenWidth, gfx_screen_width, 800, 0, 0, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Screen resolution width")
|
||||
MACRO_CONFIG_INT(GfxScreenHeight, gfx_screen_height, 600, 0, 0, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Screen resolution height")
|
||||
MACRO_CONFIG_INT(GfxFullscreen, gfx_fullscreen, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Fullscreen")
|
||||
MACRO_CONFIG_INT(GfxAlphabits, gfx_alphabits, 0, 0, 0, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Alpha bits for framebuffer (fullscreen only)")
|
||||
MACRO_CONFIG_INT(GfxColorDepth, gfx_color_depth, 24, 16, 24, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Colors bits for framebuffer (fullscreen only)")
|
||||
MACRO_CONFIG_INT(GfxClear, gfx_clear, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Clear screen before rendering")
|
||||
MACRO_CONFIG_INT(GfxVsync, gfx_vsync, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Vertical sync")
|
||||
MACRO_CONFIG_INT(GfxDisplayAllModes, gfx_display_all_modes, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "")
|
||||
MACRO_CONFIG_INT(GfxTextureCompression, gfx_texture_compression, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Use texture compression")
|
||||
MACRO_CONFIG_INT(GfxHighDetail, gfx_high_detail, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "High detail")
|
||||
MACRO_CONFIG_INT(GfxTextureQuality, gfx_texture_quality, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "")
|
||||
MACRO_CONFIG_INT(GfxFsaaSamples, gfx_fsaa_samples, 0, 0, 16, CFGFLAG_SAVE|CFGFLAG_CLIENT, "FSAA Samples")
|
||||
MACRO_CONFIG_INT(GfxRefreshRate, gfx_refresh_rate, 0, 0, 0, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Screen refresh rate")
|
||||
MACRO_CONFIG_INT(GfxFinish, gfx_finish, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "")
|
||||
MACRO_CONFIG_INT(GfxScreenWidth, gfx_screen_width, 800, 0, 0, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Screen resolution width",0)
|
||||
MACRO_CONFIG_INT(GfxScreenHeight, gfx_screen_height, 600, 0, 0, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Screen resolution height",0)
|
||||
MACRO_CONFIG_INT(GfxFullscreen, gfx_fullscreen, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Fullscreen",0)
|
||||
MACRO_CONFIG_INT(GfxAlphabits, gfx_alphabits, 0, 0, 0, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Alpha bits for framebuffer (fullscreen only)",0)
|
||||
MACRO_CONFIG_INT(GfxColorDepth, gfx_color_depth, 24, 16, 24, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Colors bits for framebuffer (fullscreen only)",0)
|
||||
MACRO_CONFIG_INT(GfxClear, gfx_clear, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Clear screen before rendering",0)
|
||||
MACRO_CONFIG_INT(GfxVsync, gfx_vsync, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Vertical sync",0)
|
||||
MACRO_CONFIG_INT(GfxDisplayAllModes, gfx_display_all_modes, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "",0)
|
||||
MACRO_CONFIG_INT(GfxTextureCompression, gfx_texture_compression, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Use texture compression",0)
|
||||
MACRO_CONFIG_INT(GfxHighDetail, gfx_high_detail, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "High detail",0)
|
||||
MACRO_CONFIG_INT(GfxTextureQuality, gfx_texture_quality, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "",0)
|
||||
MACRO_CONFIG_INT(GfxFsaaSamples, gfx_fsaa_samples, 0, 0, 16, CFGFLAG_SAVE|CFGFLAG_CLIENT, "FSAA Samples",0)
|
||||
MACRO_CONFIG_INT(GfxRefreshRate, gfx_refresh_rate, 0, 0, 0, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Screen refresh rate",0)
|
||||
MACRO_CONFIG_INT(GfxFinish, gfx_finish, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "",0)
|
||||
|
||||
MACRO_CONFIG_INT(InpMousesens, inp_mousesens, 100, 5, 100000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Mouse sensitivity")
|
||||
MACRO_CONFIG_INT(InpMousesens, inp_mousesens, 100, 5, 100000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Mouse sensitivity",0)
|
||||
|
||||
MACRO_CONFIG_INT(Debug, debug, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SERVER, "Debug mode")
|
||||
MACRO_CONFIG_INT(DbgStress, dbg_stress, 0, 0, 0, CFGFLAG_CLIENT|CFGFLAG_SERVER, "Stress systems")
|
||||
MACRO_CONFIG_INT(DbgStressNetwork, dbg_stress_network, 0, 0, 0, CFGFLAG_CLIENT|CFGFLAG_SERVER, "Stress network")
|
||||
MACRO_CONFIG_INT(DbgPref, dbg_pref, 0, 0, 1, CFGFLAG_SERVER, "Performance outputs")
|
||||
MACRO_CONFIG_INT(DbgGraphs, dbg_graphs, 0, 0, 1, CFGFLAG_CLIENT, "Performance graphs")
|
||||
MACRO_CONFIG_INT(DbgHitch, dbg_hitch, 0, 0, 0, CFGFLAG_SERVER, "Hitch warnings")
|
||||
MACRO_CONFIG_STR(DbgStressServer, dbg_stress_server, 32, "localhost", CFGFLAG_CLIENT, "Server to stress")
|
||||
MACRO_CONFIG_INT(DbgResizable, dbg_resizable, 0, 0, 0, CFGFLAG_CLIENT, "Enables window resizing")
|
||||
MACRO_CONFIG_INT(Debug, debug, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SERVER, "Debug mode",0)
|
||||
MACRO_CONFIG_INT(DbgStress, dbg_stress, 0, 0, 0, CFGFLAG_CLIENT|CFGFLAG_SERVER, "Stress systems",0)
|
||||
MACRO_CONFIG_INT(DbgStressNetwork, dbg_stress_network, 0, 0, 0, CFGFLAG_CLIENT|CFGFLAG_SERVER, "Stress network",0)
|
||||
MACRO_CONFIG_INT(DbgPref, dbg_pref, 0, 0, 1, CFGFLAG_SERVER, "Performance outputs",0)
|
||||
MACRO_CONFIG_INT(DbgGraphs, dbg_graphs, 0, 0, 1, CFGFLAG_CLIENT, "Performance graphs",0)
|
||||
MACRO_CONFIG_INT(DbgHitch, dbg_hitch, 0, 0, 0, CFGFLAG_SERVER, "Hitch warnings",0)
|
||||
MACRO_CONFIG_STR(DbgStressServer, dbg_stress_server, 32, "localhost", CFGFLAG_CLIENT, "Server to stress",0)
|
||||
MACRO_CONFIG_INT(DbgResizable, dbg_resizable, 0, 0, 0, CFGFLAG_CLIENT, "Enables window resizing",0)
|
||||
#endif
|
||||
|
|
|
@ -415,16 +415,16 @@ CConsole::CConsole(int FlagMask)
|
|||
Register("exec", "r", CFGFLAG_SERVER|CFGFLAG_CLIENT, Con_Exec, this, "Execute the specified file", 3);
|
||||
|
||||
// TODO: this should disappear
|
||||
#define MACRO_CONFIG_INT(Name,ScriptName,Def,Min,Max,Flags,Desc) \
|
||||
#define MACRO_CONFIG_INT(Name,ScriptName,Def,Min,Max,Flags,Desc,Level) \
|
||||
{ \
|
||||
static CIntVariableData Data = { this, &g_Config.m_##Name, Min, Max }; \
|
||||
Register(#ScriptName, "?i", Flags, IntVariableCommand, &Data, Desc, 3); \
|
||||
Register(#ScriptName, "?i", Flags, IntVariableCommand, &Data, Desc, Level); \
|
||||
}
|
||||
|
||||
#define MACRO_CONFIG_STR(Name,ScriptName,Len,Def,Flags,Desc) \
|
||||
#define MACRO_CONFIG_STR(Name,ScriptName,Len,Def,Flags,Desc,Level) \
|
||||
{ \
|
||||
static CStrVariableData Data = { this, g_Config.m_##Name, Len }; \
|
||||
Register(#ScriptName, "?r", Flags, StrVariableCommand, &Data, Desc, 3); \
|
||||
Register(#ScriptName, "?r", Flags, StrVariableCommand, &Data, Desc, Level); \
|
||||
}
|
||||
|
||||
#include "config_variables.h"
|
||||
|
|
|
@ -158,7 +158,10 @@ int CLayerTiles::BrushGrab(CLayerGroup *pBrush, CUIRect Rect)
|
|||
if(!m_pEditor->Input()->KeyPressed(KEY_SPACE))
|
||||
for(int y = 0; y < r.h; y++)
|
||||
for(int x = 0; x < r.w; x++)
|
||||
{
|
||||
pGrabbed->m_pTeleTile[y*pGrabbed->m_Width+x] = ((CLayerTele*)this)->m_pTeleTile[(r.y+y)*m_Width+(r.x+x)];
|
||||
m_pEditor->m_TeleNum = pGrabbed->m_pTeleTile[y*pGrabbed->m_Width+x].m_Number;
|
||||
}
|
||||
}
|
||||
else if(m_pEditor->GetSelectedLayer(0) == m_pEditor->m_Map.m_pSpeedupLayer)
|
||||
{
|
||||
|
@ -178,7 +181,11 @@ int CLayerTiles::BrushGrab(CLayerGroup *pBrush, CUIRect Rect)
|
|||
if(!m_pEditor->Input()->KeyPressed(KEY_SPACE))
|
||||
for(int y = 0; y < r.h; y++)
|
||||
for(int x = 0; x < r.w; x++)
|
||||
{
|
||||
pGrabbed->m_pSpeedupTile[y*pGrabbed->m_Width+x] = ((CLayerSpeedup*)this)->m_pSpeedupTile[(r.y+y)*m_Width+(r.x+x)];
|
||||
m_pEditor->m_SpeedupAngle = pGrabbed->m_pSpeedupTile[y*pGrabbed->m_Width+x].m_Angle;
|
||||
m_pEditor->m_SpeedupForce = pGrabbed->m_pSpeedupTile[y*pGrabbed->m_Width+x].m_Force;
|
||||
}
|
||||
}
|
||||
else if(m_pEditor->GetSelectedLayer(0) == m_pEditor->m_Map.m_pSwitchLayer)
|
||||
{
|
||||
|
@ -198,7 +205,10 @@ int CLayerTiles::BrushGrab(CLayerGroup *pBrush, CUIRect Rect)
|
|||
if(!m_pEditor->Input()->KeyPressed(KEY_SPACE))
|
||||
for(int y = 0; y < r.h; y++)
|
||||
for(int x = 0; x < r.w; x++)
|
||||
{
|
||||
pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x] = ((CLayerSwitch*)this)->m_pSwitchTile[(r.y+y)*m_Width+(r.x+x)];
|
||||
m_pEditor->m_SwitchNum = pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x].m_Number;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -711,8 +721,8 @@ void CLayerFront::BrushDraw(CLayer *pBrush, float wx, float wy)
|
|||
if(fx<0 || fx >= m_Width || fy < 0 || fy >= m_Height)
|
||||
continue;
|
||||
|
||||
// dont allow tele in and out tiles... same with speedup tile in front
|
||||
if(m_pEditor->GetSelectedLayer(0) == m_pEditor->m_Map.m_pFrontLayer && (l->m_pTiles[y*l->m_Width+x].m_Index == TILE_TELEIN || l->m_pTiles[y*l->m_Width+x].m_Index == TILE_TELEOUT || l->m_pTiles[y*l->m_Width+x].m_Index == TILE_BOOST || l->m_pTiles[y*l->m_Width+x].m_Index == (ENTITY_TRIGGER + ENTITY_OFFSET) || l->m_pTiles[y*l->m_Width+x].m_Index == (ENTITY_DOOR + ENTITY_OFFSET)) || l->m_pTiles[y*l->m_Width+x].m_Index == (TILE_SOLID) || l->m_pTiles[y*l->m_Width+x].m_Index == (TILE_NOHOOK))
|
||||
// dont allow tele in and out tiles... same with speedup tile and alot more in front
|
||||
if(m_pEditor->GetSelectedLayer(0) == m_pEditor->m_Map.m_pFrontLayer && (l->m_pTiles[y*l->m_Width+x].m_Index == TILE_TELEIN || l->m_pTiles[y*l->m_Width+x].m_Index == TILE_TELEOUT || l->m_pTiles[y*l->m_Width+x].m_Index == TILE_BOOST || l->m_pTiles[y*l->m_Width+x].m_Index == (ENTITY_TRIGGER + ENTITY_OFFSET) || l->m_pTiles[y*l->m_Width+x].m_Index == (ENTITY_DOOR + ENTITY_OFFSET)) || l->m_pTiles[y*l->m_Width+x].m_Index == (TILE_SOLID) || l->m_pTiles[y*l->m_Width+x].m_Index == (TILE_NOHOOK) || (l->m_pTiles[y*l->m_Width+x].m_Index >=TILE_CP_D && l->m_pTiles[y*l->m_Width+x].m_Index <=TILE_CP_L_F))
|
||||
continue;
|
||||
m_pTiles[fy*m_Width+fx] = l->m_pTiles[y*l->m_Width+x];
|
||||
}
|
||||
|
|
|
@ -117,6 +117,9 @@ enum
|
|||
TILE_STOPT,
|
||||
TILE_BEGIN,
|
||||
TILE_END,
|
||||
TILE_STOPH=60,
|
||||
TILE_STOPV,
|
||||
TILE_STOPA,
|
||||
TILE_CP_D=64,
|
||||
TILE_CP_U,
|
||||
TILE_CP_R,
|
||||
|
|
|
@ -646,12 +646,12 @@ void CCharacter::Tick()
|
|||
{
|
||||
CGameControllerDDRace* Controller = (CGameControllerDDRace*)GameServer()->m_pController;
|
||||
int MapIndex = GameServer()->Collision()->GetMapIndex(m_PrevPos, m_Pos);
|
||||
int TileIndex = GameServer()->Collision()->GetCollisionDDRace(MapIndex);
|
||||
int TileFIndex = GameServer()->Collision()->GetFCollisionDDRace(MapIndex);
|
||||
int MapIndexL = GameServer()->Collision()->GetMapIndex(m_PrevPos, vec2(m_Pos.x + m_ProximityRadius/2,m_Pos.y));
|
||||
int MapIndexR = GameServer()->Collision()->GetMapIndex(m_PrevPos, vec2(m_Pos.x - m_ProximityRadius/2,m_Pos.y));
|
||||
int MapIndexT = GameServer()->Collision()->GetMapIndex(m_PrevPos, vec2(m_Pos.x,m_Pos.y + m_ProximityRadius/2+5));
|
||||
int MapIndexB = GameServer()->Collision()->GetMapIndex(m_PrevPos, vec2(m_Pos.x,m_Pos.y - m_ProximityRadius/2-5));
|
||||
int TileIndex = GameServer()->Collision()->GetCollisionDDRace(MapIndex);
|
||||
int TileFIndex = GameServer()->Collision()->GetFCollisionDDRace(MapIndex);
|
||||
int TileIndexL = GameServer()->Collision()->GetCollisionDDRace(MapIndexL);
|
||||
int TileFIndexL = GameServer()->Collision()->GetFCollisionDDRace(MapIndexL);
|
||||
int TileIndexR = GameServer()->Collision()->GetCollisionDDRace(MapIndexR);
|
||||
|
@ -797,81 +797,101 @@ void CCharacter::Tick()
|
|||
UnFreeze();
|
||||
}
|
||||
|
||||
if(TileIndex == TILE_STOPL || TileIndexL == TILE_STOPL)
|
||||
if(TileIndex == TILE_STOPL || TileIndexL == TILE_STOPL || TileFIndex == TILE_STOPL || TileFIndexL == TILE_STOPL)
|
||||
{
|
||||
if(m_Core.m_Vel.x > 0)
|
||||
{
|
||||
if((int)GameServer()->Collision()->GetPos(TileIndex).x < (int)m_Core.m_Pos.x)
|
||||
m_Core.m_Pos.x = m_PrevPos.x;
|
||||
m_Core.m_Pos.x = m_PrevPos.x;
|
||||
m_Core.m_Vel.x = 0;
|
||||
}
|
||||
}
|
||||
if(TileFIndex == TILE_STOPL || TileFIndexL == TILE_STOPL)
|
||||
if(TileIndex == TILE_STOPR || TileIndexR == TILE_STOPR || TileFIndex == TILE_STOPR || TileFIndexR == TILE_STOPR)
|
||||
{
|
||||
if(m_Core.m_Vel.x < 0)
|
||||
{
|
||||
m_Core.m_Pos.x = m_PrevPos.x;
|
||||
m_Core.m_Vel.x = 0;
|
||||
}
|
||||
}
|
||||
if(TileIndex == TILE_STOPB || TileIndexB == TILE_STOPB || TileFIndex == TILE_STOPB || TileFIndexB == TILE_STOPB)
|
||||
{
|
||||
if(m_Core.m_Vel.y < 0)
|
||||
{
|
||||
m_Core.m_Pos.y = m_PrevPos.y;
|
||||
m_Core.m_Vel.y = 0;
|
||||
}
|
||||
}
|
||||
if(TileIndex == TILE_STOPT || TileIndexT == TILE_STOPT || TileFIndex == TILE_STOPT || TileFIndexT == TILE_STOPT)
|
||||
{
|
||||
if(m_Core.m_Vel.y > 0)
|
||||
{
|
||||
m_Core.m_Pos.y = m_PrevPos.y;
|
||||
m_Core.m_Vel.y = 0;
|
||||
}
|
||||
m_Core.m_Jumped = 0;
|
||||
}
|
||||
if(TileIndex == TILE_STOPH || TileIndexR == TILE_STOPH || TileIndexL == TILE_STOPH || TileFIndex == TILE_STOPH || TileFIndexR == TILE_STOPH || TileFIndexL == TILE_STOPH)
|
||||
{
|
||||
if(m_Core.m_Vel.x)
|
||||
m_Core.m_Pos.x = m_PrevPos.x;
|
||||
m_Core.m_Vel.x = 0;
|
||||
}
|
||||
if(TileIndex == TILE_STOPV || TileIndexT == TILE_STOPV || TileIndexB == TILE_STOPV || TileFIndex == TILE_STOPV || TileFIndexT == TILE_STOPV || TileFIndexB == TILE_STOPV)
|
||||
{
|
||||
if(m_Core.m_Vel.y)
|
||||
m_Core.m_Pos.y = m_PrevPos.y;
|
||||
if(m_Pos.y > m_Core.m_Pos.y)
|
||||
m_Core.m_Jumped = 0;
|
||||
m_Core.m_Vel.y = 0;
|
||||
}
|
||||
if(TileIndex == TILE_STOPA || TileFIndex == TILE_STOPA)
|
||||
{
|
||||
if(m_Core.m_Vel.y)
|
||||
{
|
||||
m_Core.m_Pos.y = m_PrevPos.y;
|
||||
m_Core.m_Vel.y = 0;
|
||||
}
|
||||
if(m_Pos.y > m_Core.m_Pos.y)
|
||||
m_Core.m_Jumped = 0;
|
||||
if(m_Core.m_Vel.x)
|
||||
{
|
||||
m_Core.m_Pos.x = m_PrevPos.x;
|
||||
m_Core.m_Vel.x = 0;
|
||||
}
|
||||
}
|
||||
if(TileIndexT == TILE_STOPA || TileFIndexT == TILE_STOPA)
|
||||
{
|
||||
if(m_Core.m_Vel.y > 0)
|
||||
{
|
||||
m_Core.m_Pos.y = m_PrevPos.y;
|
||||
m_Core.m_Vel.y = 0;
|
||||
}
|
||||
m_Core.m_Jumped = 0;
|
||||
}
|
||||
if(TileIndexB == TILE_STOPA || TileFIndexB == TILE_STOPA)
|
||||
{
|
||||
if(m_Core.m_Vel.y < 0)
|
||||
{
|
||||
m_Core.m_Pos.y = m_PrevPos.y;
|
||||
m_Core.m_Vel.y = 0;
|
||||
}
|
||||
}
|
||||
if(TileIndexR == TILE_STOPA || TileFIndexR == TILE_STOPA)
|
||||
{
|
||||
if(m_Core.m_Vel.x < 0)
|
||||
{
|
||||
m_Core.m_Pos.x = m_PrevPos.x;
|
||||
m_Core.m_Vel.x = 0;
|
||||
}
|
||||
}
|
||||
if(TileIndexL == TILE_STOPA || TileFIndexL == TILE_STOPA)
|
||||
{
|
||||
if(m_Core.m_Vel.x > 0)
|
||||
{
|
||||
if((int)GameServer()->Collision()->GetPos(TileFIndex).x < (int)m_Core.m_Pos.x)
|
||||
m_Core.m_Pos.x = m_PrevPos.x;
|
||||
m_Core.m_Pos.x = m_PrevPos.x;
|
||||
m_Core.m_Vel.x = 0;
|
||||
}
|
||||
}
|
||||
if(TileIndex == TILE_STOPR || TileIndexR == TILE_STOPR)
|
||||
{
|
||||
if(m_Core.m_Vel.x < 0)
|
||||
{
|
||||
if((int)GameServer()->Collision()->GetPos(TileIndex).x > (int)m_Core.m_Pos.x)
|
||||
m_Core.m_Pos.x = m_PrevPos.x;
|
||||
m_Core.m_Vel.x = 0;
|
||||
}
|
||||
}
|
||||
if(TileFIndex == TILE_STOPR || TileFIndexR == TILE_STOPR)
|
||||
{
|
||||
if(m_Core.m_Vel.x < 0)
|
||||
{
|
||||
if((int)GameServer()->Collision()->GetPos(TileFIndex).x > (int)m_Core.m_Pos.x)
|
||||
m_Core.m_Pos.x = m_PrevPos.x;
|
||||
m_Core.m_Vel.x = 0;
|
||||
}
|
||||
}
|
||||
if(TileIndex == TILE_STOPB || TileIndexB == TILE_STOPB)
|
||||
{
|
||||
if(m_Core.m_Vel.y < 0)
|
||||
{
|
||||
if((int)GameServer()->Collision()->GetPos(TileIndex).y > (int)m_Core.m_Pos.y)
|
||||
m_Core.m_Pos.y = m_PrevPos.y;
|
||||
m_Core.m_Vel.y = 0;
|
||||
}
|
||||
}
|
||||
if(TileFIndex == TILE_STOPB || TileFIndexB == TILE_STOPB)
|
||||
{
|
||||
if(m_Core.m_Vel.y < 0)
|
||||
{
|
||||
if((int)GameServer()->Collision()->GetPos(TileFIndex).y > (int)m_Core.m_Pos.y)
|
||||
m_Core.m_Pos.y = m_PrevPos.y;
|
||||
m_Core.m_Vel.y = 0;
|
||||
}
|
||||
}
|
||||
if(TileIndex == TILE_STOPT || TileIndexT == TILE_STOPT)
|
||||
{
|
||||
if(m_Core.m_Vel.y > 0)
|
||||
{
|
||||
if((int)GameServer()->Collision()->GetPos(TileIndex).y < (int)m_Core.m_Pos.y)
|
||||
m_Core.m_Pos.y = m_PrevPos.y;
|
||||
m_Core.m_Jumped = 0;
|
||||
//m_Jumped = 1;
|
||||
m_Core.m_Vel.y = 0;
|
||||
}
|
||||
}
|
||||
if(TileFIndex == TILE_STOPT || TileFIndexT == TILE_STOPT)
|
||||
{
|
||||
if(m_Core.m_Vel.y > 0)
|
||||
{
|
||||
if((int)GameServer()->Collision()->GetPos(TileFIndex).y < (int)m_Core.m_Pos.y)
|
||||
m_Core.m_Pos.y = m_PrevPos.y;
|
||||
m_Core.m_Jumped = 0;
|
||||
m_Core.m_Vel.y = 0;
|
||||
}
|
||||
}
|
||||
if (TileIndex == TILE_BOOST_L || TileFIndex == TILE_BOOST_L)
|
||||
{
|
||||
if(m_PrevPos.x-m_Pos.x<0)
|
||||
|
|
|
@ -8,7 +8,10 @@ CDoor::CDoor(CGameWorld *pGameWorld, vec2 Pos, float Rotation, int Length, bool
|
|||
: CEntity(pGameWorld, NETOBJTYPE_LASER)
|
||||
{
|
||||
m_Pos = Pos;
|
||||
m_Opened = Opened;
|
||||
for (int i = 0; i < MAX_CLIENTS; ++i) {
|
||||
m_Opened[i] = false;
|
||||
}//TODO: Check this
|
||||
|
||||
|
||||
vec2 Dir = vec2(sin(Rotation), cos(Rotation));
|
||||
vec2 To = Pos + normalize(Dir)*Length;
|
||||
|
@ -17,40 +20,49 @@ CDoor::CDoor(CGameWorld *pGameWorld, vec2 Pos, float Rotation, int Length, bool
|
|||
GameWorld()->InsertEntity(this);
|
||||
}
|
||||
|
||||
void CDoor::Open(int Tick)
|
||||
void CDoor::Open(int Tick, bool ActivatedTeam[])
|
||||
{
|
||||
m_EvalTick = Tick;
|
||||
m_Opened = true;
|
||||
for (int i = 0; i < MAX_CLIENTS; ++i) {
|
||||
m_Opened[i] = ActivatedTeam[i];
|
||||
}
|
||||
}
|
||||
|
||||
void CDoor::Close()
|
||||
{
|
||||
m_Opened = false;
|
||||
for (int i = 0; i < MAX_CLIENTS; ++i) {
|
||||
m_Opened[i] = false;
|
||||
}
|
||||
}
|
||||
|
||||
bool CDoor::HitCharacter()
|
||||
bool CDoor::HitCharacter(int Team)
|
||||
{
|
||||
vec2 At;
|
||||
std::list < CCharacter * > hittedCharacters = GameServer()->m_World.IntersectedCharacters(m_Pos, m_To, 1.f, At, 0);
|
||||
if(hittedCharacters.empty()) return false;
|
||||
for(std::list < CCharacter * >::iterator i = hittedCharacters.begin(); i != hittedCharacters.end(); i++) {
|
||||
CCharacter * Char = *i;
|
||||
Char->m_Doored = true;
|
||||
if(Char->Team() == Team)
|
||||
Char = false;
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
void CDoor::Reset()
|
||||
{
|
||||
m_Opened = false;
|
||||
for (int i = 0; i < MAX_CLIENTS; ++i) {
|
||||
m_Opened[i] = false;
|
||||
}
|
||||
}
|
||||
|
||||
void CDoor::Tick()
|
||||
{
|
||||
if (!m_Opened)
|
||||
HitCharacter();
|
||||
else if (m_EvalTick + 10 < Server()->Tick())
|
||||
for (int i = 0; i < MAX_CLIENTS; ++i) {
|
||||
if(!m_Opened[i]) {
|
||||
HitCharacter(i);
|
||||
}
|
||||
}
|
||||
if (m_EvalTick + 10 < Server()->Tick())
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
@ -64,7 +76,7 @@ void CDoor::Snap(int SnappingClient)
|
|||
pObj->m_X = (int)m_Pos.x;
|
||||
pObj->m_Y = (int)m_Pos.y;
|
||||
|
||||
if (!m_Opened)
|
||||
if (!m_Opened[SnappingClient])
|
||||
{
|
||||
pObj->m_FromX = (int)m_To.x;
|
||||
pObj->m_FromY = (int)m_To.y;
|
||||
|
|
|
@ -8,14 +8,13 @@ class CTrigger;
|
|||
class CDoor : public CEntity
|
||||
{
|
||||
vec2 m_To;
|
||||
int m_ActivatedTeam;
|
||||
int m_EvalTick;
|
||||
bool m_Opened;
|
||||
bool HitCharacter();
|
||||
bool m_Opened[MAX_CLIENTS];
|
||||
bool HitCharacter(int Team);
|
||||
|
||||
public:
|
||||
|
||||
void Open(int Tick);
|
||||
void Open(int Tick, bool ActivatedTeam[]);
|
||||
void Close();
|
||||
CDoor(CGameWorld *pGameWorld, vec2 Pos, float Rotation, int Length, bool Opened);
|
||||
|
||||
|
|
|
@ -11,72 +11,73 @@
|
|||
|
||||
const int LENGTH=700;
|
||||
|
||||
CDragger::CDragger(CGameWorld *pGameWorld, vec2 pos, float strength, bool nw)
|
||||
CDragger::CDragger(CGameWorld *pGameWorld, vec2 Pos, float Strength, bool NW)
|
||||
: CEntity(pGameWorld, NETOBJTYPE_LASER)
|
||||
{
|
||||
this->m_Pos = pos;
|
||||
this->strength = strength;
|
||||
this->eval_tick=Server()->Tick();
|
||||
this->nw=nw;
|
||||
m_Pos = Pos;
|
||||
m_Strength = Strength;
|
||||
m_EvalTick = Server()->Tick();
|
||||
m_NW = NW;
|
||||
|
||||
GameWorld()->InsertEntity(this);
|
||||
}
|
||||
|
||||
void CDragger::move()
|
||||
void CDragger::Move()
|
||||
{
|
||||
if (target)
|
||||
if (m_Target)
|
||||
return;
|
||||
CCharacter *ents[16];
|
||||
int num = -1;
|
||||
num = GameServer()->m_World.FindEntities(m_Pos,LENGTH, (CEntity**)ents, 16, NETOBJTYPE_CHARACTER);
|
||||
int id=-1;
|
||||
int minlen=0;
|
||||
for (int i = 0; i < num; i++)
|
||||
CCharacter *Ents[16];
|
||||
int Num = -1;
|
||||
Num = GameServer()->m_World.FindEntities(m_Pos,LENGTH, (CEntity**)Ents, 16, NETOBJTYPE_CHARACTER);
|
||||
int Id=-1;
|
||||
int MinLen=0;
|
||||
for (int i = 0; i < Num; i++)
|
||||
{
|
||||
target = ents[i];
|
||||
int res=0;
|
||||
if (!nw)
|
||||
res = GameServer()->Collision()->IntersectNoLaser(m_Pos, target->m_Pos, 0, 0);
|
||||
m_Target = Ents[i];
|
||||
int Res=0;
|
||||
if (!m_NW)
|
||||
Res = GameServer()->Collision()->IntersectNoLaser(m_Pos, m_Target->m_Pos, 0, 0);
|
||||
else
|
||||
res = GameServer()->Collision()->IntersectNoLaserNW(m_Pos, target->m_Pos, 0, 0);
|
||||
Res = GameServer()->Collision()->IntersectNoLaserNW(m_Pos, m_Target->m_Pos, 0, 0);
|
||||
|
||||
if (res==0)
|
||||
if (Res==0)
|
||||
{
|
||||
int len=length(ents[i]->m_Pos - m_Pos);
|
||||
if (minlen==0 || minlen>len)
|
||||
int Len=length(Ents[i]->m_Pos - m_Pos);
|
||||
if (MinLen==0 || MinLen>Len)
|
||||
{
|
||||
minlen=len;
|
||||
id=i;
|
||||
MinLen=Len;
|
||||
Id=i;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (id!=-1)
|
||||
if (Id!=-1)
|
||||
{
|
||||
target = ents[id];
|
||||
m_Target = Ents[Id];
|
||||
}
|
||||
else
|
||||
{
|
||||
target=0;
|
||||
m_Target=0;
|
||||
}
|
||||
}
|
||||
|
||||
void CDragger::drag()
|
||||
void CDragger::Drag()
|
||||
{
|
||||
if (target)
|
||||
if (m_Target)
|
||||
{
|
||||
|
||||
int res = 0;
|
||||
if (!nw)
|
||||
res = GameServer()->Collision()->IntersectNoLaser(m_Pos, target->m_Pos, 0, 0);
|
||||
int Res = 0;
|
||||
if (!m_NW)
|
||||
Res = GameServer()->Collision()->IntersectNoLaser(m_Pos, m_Target->m_Pos, 0, 0);
|
||||
else
|
||||
res = GameServer()->Collision()->IntersectNoLaserNW(m_Pos, target->m_Pos, 0, 0);
|
||||
if (res || length(m_Pos-target->m_Pos)>700)
|
||||
Res = GameServer()->Collision()->IntersectNoLaserNW(m_Pos, m_Target->m_Pos, 0, 0);
|
||||
if (Res || length(m_Pos-m_Target->m_Pos)>700)
|
||||
{
|
||||
target=0;
|
||||
m_Target=0;
|
||||
}
|
||||
else
|
||||
if (length(m_Pos-target->m_Pos)>28)
|
||||
if(!((target->m_CurrentTile >= TILE_STOPL && target->m_CurrentTile <= TILE_STOPT) || (target->m_CurrentFTile >= TILE_STOPL && target->m_CurrentFTile <= TILE_STOPT)))
|
||||
target->m_Core.m_Vel+=normalize(m_Pos-target->m_Pos)*strength;
|
||||
if (length(m_Pos-m_Target->m_Pos)>28)
|
||||
if(!((m_Target->m_CurrentTile >= TILE_STOPL && m_Target->m_CurrentTile <= TILE_STOPT) || (m_Target->m_CurrentFTile >= TILE_STOPL && m_Target->m_CurrentFTile <= TILE_STOPT)))
|
||||
m_Target->m_Core.m_Vel+=normalize(m_Pos-m_Target->m_Pos)*m_Strength;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,40 +90,40 @@ void CDragger::Tick()
|
|||
{
|
||||
if (Server()->Tick()%int(Server()->TickSpeed()*0.15f)==0)
|
||||
{
|
||||
eval_tick=Server()->Tick();
|
||||
int index = GameServer()->Collision()->IsCp(m_Pos.x, m_Pos.y);
|
||||
if (index)
|
||||
m_EvalTick=Server()->Tick();
|
||||
int Index = GameServer()->Collision()->IsCp(m_Pos.x, m_Pos.y);
|
||||
if (Index)
|
||||
{
|
||||
core=GameServer()->Collision()->CpSpeed(index);
|
||||
m_Core=GameServer()->Collision()->CpSpeed(Index);
|
||||
}
|
||||
m_Pos+=core;
|
||||
move();
|
||||
m_Pos+=m_Core;
|
||||
Move();
|
||||
}
|
||||
drag();
|
||||
Drag();
|
||||
return;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CDragger::Snap(int snapping_client)
|
||||
void CDragger::Snap(int SnappingClient)
|
||||
{
|
||||
if (target)
|
||||
if (m_Target)
|
||||
{
|
||||
if(NetworkClipped(snapping_client, m_Pos) && NetworkClipped(snapping_client,target->m_Pos))
|
||||
if(NetworkClipped(SnappingClient, m_Pos) && NetworkClipped(SnappingClient,m_Target->m_Pos))
|
||||
return;
|
||||
}
|
||||
else
|
||||
if(NetworkClipped(snapping_client,m_Pos))
|
||||
if(NetworkClipped(SnappingClient,m_Pos))
|
||||
return;
|
||||
|
||||
CNetObj_Laser *obj = static_cast<CNetObj_Laser *>(Server()->SnapNewItem(NETOBJTYPE_LASER, m_Id, sizeof(CNetObj_Laser)));
|
||||
|
||||
obj->m_X = (int)m_Pos.x;
|
||||
obj->m_Y = (int)m_Pos.y;
|
||||
if (target)
|
||||
if (m_Target)
|
||||
{
|
||||
obj->m_FromX = (int)target->m_Pos.x;
|
||||
obj->m_FromY = (int)target->m_Pos.y;
|
||||
obj->m_FromX = (int)m_Target->m_Pos.x;
|
||||
obj->m_FromY = (int)m_Target->m_Pos.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -131,12 +132,12 @@ void CDragger::Snap(int snapping_client)
|
|||
}
|
||||
|
||||
|
||||
int start_tick = eval_tick;
|
||||
if (start_tick<Server()->Tick()-4)
|
||||
start_tick=Server()->Tick()-4;
|
||||
else if (start_tick>Server()->Tick())
|
||||
start_tick=Server()->Tick();
|
||||
obj->m_StartTick = start_tick;
|
||||
int StartTick = m_EvalTick;
|
||||
if (StartTick < Server()->Tick() - 4)
|
||||
StartTick = Server()->Tick() - 4;
|
||||
else if (StartTick>Server()->Tick())
|
||||
StartTick = Server()->Tick();
|
||||
obj->m_StartTick = StartTick;
|
||||
}
|
||||
//ÿ òóò áûë
|
||||
//ÿ òîæå
|
||||
|
|
|
@ -9,17 +9,17 @@ class CCharacter;
|
|||
|
||||
class CDragger : public CEntity
|
||||
{
|
||||
vec2 core;
|
||||
float strength;
|
||||
int eval_tick;
|
||||
void move();
|
||||
void drag();
|
||||
CCharacter *target;
|
||||
bool nw;
|
||||
vec2 m_Core;
|
||||
float m_Strength;
|
||||
int m_EvalTick;
|
||||
void Move();
|
||||
void Drag();
|
||||
CCharacter * m_Target;
|
||||
bool m_NW;
|
||||
public:
|
||||
|
||||
|
||||
CDragger(CGameWorld *pGameWorld, vec2 pos, float strength, bool nw=false);
|
||||
CDragger(CGameWorld *pGameWorld, vec2 Pos, float Strength, bool NW=false);
|
||||
|
||||
virtual void Reset();
|
||||
virtual void Tick();
|
||||
|
|
|
@ -36,7 +36,7 @@ void CGun::Fire()
|
|||
}
|
||||
|
||||
int Num = -1;
|
||||
Num = GameServer()->m_World.FindEntities(m_Pos,RANGE, (CEntity**)Ents, 16, NETOBJTYPE_CHARACTER);
|
||||
Num = GameServer()->m_World.FindEntities(m_Pos, RANGE, (CEntity**)Ents, 16, NETOBJTYPE_CHARACTER);
|
||||
|
||||
for (int i = 0; i < Num; i++)
|
||||
{
|
||||
|
@ -57,12 +57,6 @@ void CGun::Fire()
|
|||
}
|
||||
}
|
||||
}
|
||||
//if (Id!=-1)
|
||||
//{
|
||||
// CCharacter *Target = Ents[Id];
|
||||
// vec2 Fdir = normalize(Target->m_Pos - m_Pos);
|
||||
// new CPlasma(&GameServer()->m_World, m_Pos, Fdir, m_Freeze, m_Explosive);
|
||||
//}
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if(IdInTeam[i] != -1) {
|
||||
CCharacter *Target = Ents[IdInTeam[i]];
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <engine/shared/config.h>
|
||||
#include "laser.h"
|
||||
|
||||
CLaser::CLaser(CGameWorld *pGameWorld, vec2 Pos, vec2 Direction, float StartEnergy, int Owner, int type)
|
||||
CLaser::CLaser(CGameWorld *pGameWorld, vec2 Pos, vec2 Direction, float StartEnergy, int Owner, int Type)
|
||||
: CEntity(pGameWorld, NETOBJTYPE_LASER)
|
||||
{
|
||||
m_Pos = Pos;
|
||||
|
@ -13,7 +13,7 @@ CLaser::CLaser(CGameWorld *pGameWorld, vec2 Pos, vec2 Direction, float StartEner
|
|||
m_Dir = Direction;
|
||||
m_Bounces = 0;
|
||||
m_EvalTick = 0;
|
||||
m_Type = type;
|
||||
m_Type = Type;
|
||||
GameWorld()->InsertEntity(this);
|
||||
DoBounce();
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
class CLaser : public CEntity
|
||||
{
|
||||
public:
|
||||
CLaser(CGameWorld *pGameWorld, vec2 Pos, vec2 Direction, float StartEnergy, int Owner, int type);
|
||||
CLaser(CGameWorld *pGameWorld, vec2 Pos, vec2 Direction, float StartEnergy, int Owner, int Type);
|
||||
|
||||
virtual void Reset();
|
||||
virtual void Tick();
|
||||
|
|
|
@ -12,65 +12,64 @@
|
|||
|
||||
|
||||
|
||||
CLight::CLight(CGameWorld *pGameWorld, vec2 pos, float rotation, int length)
|
||||
CLight::CLight(CGameWorld *pGameWorld, vec2 Pos, float Rotation, int Length)
|
||||
: CEntity(pGameWorld, NETOBJTYPE_LASER)
|
||||
{
|
||||
TICK=(Server()->TickSpeed()*0.15f);
|
||||
this->m_Pos = pos;
|
||||
this->rotation = rotation;
|
||||
this->length = length;
|
||||
this->eval_tick=Server()->Tick();
|
||||
m_Tick=(Server()->TickSpeed()*0.15f);
|
||||
m_Pos = Pos;
|
||||
m_Rotation = Rotation;
|
||||
m_Length = Length;
|
||||
m_EvalTick = Server()->Tick();
|
||||
GameWorld()->InsertEntity(this);
|
||||
step();
|
||||
Step();
|
||||
}
|
||||
|
||||
|
||||
bool CLight::hit_character()
|
||||
bool CLight::HitCharacter()
|
||||
{
|
||||
vec2 nothing;
|
||||
std::list < CCharacter * > hittedCharacters = GameServer()->m_World.IntersectedCharacters(m_Pos, to, 0.0f, nothing, 0);
|
||||
std::list < CCharacter * > hittedCharacters = GameServer()->m_World.IntersectedCharacters(m_Pos, m_To, 0.0f, nothing, 0);
|
||||
if(hittedCharacters.empty()) return false;
|
||||
for(std::list < CCharacter * >::iterator i = hittedCharacters.begin(); i != hittedCharacters.end(); i++) {
|
||||
CCharacter * Char = *i;
|
||||
Char->Freeze(Server()->TickSpeed()*3);
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
void CLight::move()
|
||||
void CLight::Move()
|
||||
{
|
||||
if (speed != 0)
|
||||
if (m_Speed != 0)
|
||||
{
|
||||
if ((cur_length>=length && speed>0) || (cur_length<=0 && speed<0))
|
||||
speed=-speed;
|
||||
cur_length+=speed*TICK + length_l;
|
||||
length_l=0;
|
||||
if (cur_length>length)
|
||||
if ((m_CurveLength>=m_Length && m_Speed>0) || (m_CurveLength<=0 && m_Speed<0))
|
||||
m_Speed=-m_Speed;
|
||||
m_CurveLength+=m_Speed*m_Tick + m_LengthL;
|
||||
m_LengthL=0;
|
||||
if (m_CurveLength>m_Length)
|
||||
{
|
||||
length_l=cur_length-length;
|
||||
cur_length=length;
|
||||
m_LengthL=m_CurveLength-m_Length;
|
||||
m_CurveLength=m_Length;
|
||||
}
|
||||
else if(cur_length<0)
|
||||
else if(m_CurveLength<0)
|
||||
{
|
||||
length_l=0+cur_length;
|
||||
cur_length=0;
|
||||
m_LengthL=0+m_CurveLength;
|
||||
m_CurveLength=0;
|
||||
}
|
||||
}
|
||||
|
||||
rotation+=ang_speed*TICK;
|
||||
if (rotation>pi*2)
|
||||
rotation-=pi*2;
|
||||
else if(rotation<0)
|
||||
rotation+=pi*2;
|
||||
|
||||
m_Rotation+=m_AngularSpeed*m_Tick;
|
||||
if (m_Rotation>pi*2)
|
||||
m_Rotation-=pi*2;
|
||||
else if(m_Rotation<0)
|
||||
m_Rotation+=pi*2;
|
||||
}
|
||||
|
||||
void CLight::step()
|
||||
void CLight::Step()
|
||||
{
|
||||
move();
|
||||
vec2 dir(sin(rotation), cos(rotation));
|
||||
vec2 to2 = m_Pos + normalize(dir)*cur_length;
|
||||
GameServer()->Collision()->IntersectNoLaser(m_Pos, to2, &to,0 );
|
||||
Move();
|
||||
vec2 dir(sin(m_Rotation), cos(m_Rotation));
|
||||
vec2 to2 = m_Pos + normalize(dir)*m_CurveLength;
|
||||
GameServer()->Collision()->IntersectNoLaser(m_Pos, to2, &m_To,0 );
|
||||
}
|
||||
|
||||
void CLight::Reset()
|
||||
|
@ -83,17 +82,17 @@ void CLight::Tick()
|
|||
|
||||
if (Server()->Tick()%int(Server()->TickSpeed()*0.15f)==0)
|
||||
{
|
||||
eval_tick=Server()->Tick();
|
||||
m_EvalTick=Server()->Tick();
|
||||
int index = GameServer()->Collision()->IsCp(m_Pos.x,m_Pos.y);
|
||||
if (index)
|
||||
{
|
||||
core=GameServer()->Collision()->CpSpeed(index);
|
||||
m_Core=GameServer()->Collision()->CpSpeed(index);
|
||||
}
|
||||
m_Pos+=core;
|
||||
step();
|
||||
m_Pos+=m_Core;
|
||||
Step();
|
||||
}
|
||||
|
||||
hit_character();
|
||||
HitCharacter();
|
||||
return;
|
||||
|
||||
|
||||
|
@ -101,18 +100,18 @@ void CLight::Tick()
|
|||
|
||||
void CLight::Snap(int snapping_client)
|
||||
{
|
||||
if(NetworkClipped(snapping_client,m_Pos) && NetworkClipped(snapping_client,to))
|
||||
if(NetworkClipped(snapping_client,m_Pos) && NetworkClipped(snapping_client,m_To))
|
||||
return;
|
||||
|
||||
|
||||
CNetObj_Laser *pObj = static_cast<CNetObj_Laser *>(Server()->SnapNewItem(NETOBJTYPE_LASER, m_Id, sizeof(CNetObj_Laser)));
|
||||
pObj->m_X = (int)m_Pos.x;
|
||||
pObj->m_Y = (int)m_Pos.y;
|
||||
pObj->m_FromX = (int)to.x;
|
||||
pObj->m_FromY = (int)to.y;
|
||||
pObj->m_FromX = (int)m_To.x;
|
||||
pObj->m_FromY = (int)m_To.y;
|
||||
|
||||
|
||||
int start_tick = eval_tick;
|
||||
int start_tick = m_EvalTick;
|
||||
if (start_tick<Server()->Tick()-4)
|
||||
start_tick=Server()->Tick()-4;
|
||||
else if (start_tick>Server()->Tick())
|
||||
|
|
|
@ -7,26 +7,26 @@
|
|||
|
||||
class CLight : public CEntity
|
||||
{
|
||||
float rotation;
|
||||
vec2 to;
|
||||
vec2 core;
|
||||
float m_Rotation;
|
||||
vec2 m_To;
|
||||
vec2 m_Core;
|
||||
|
||||
int eval_tick;
|
||||
int m_EvalTick;
|
||||
|
||||
int TICK;
|
||||
int m_Tick;
|
||||
|
||||
bool hit_character();
|
||||
void move();
|
||||
void step();
|
||||
bool HitCharacter();
|
||||
void Move();
|
||||
void Step();
|
||||
public:
|
||||
int cur_length;
|
||||
int length_l;
|
||||
float ang_speed;
|
||||
int speed;
|
||||
int length;
|
||||
int m_CurveLength;
|
||||
int m_LengthL;
|
||||
float m_AngularSpeed;
|
||||
int m_Speed;
|
||||
int m_Length;
|
||||
|
||||
|
||||
CLight(CGameWorld *pGameWorld, vec2 pos, float rotation, int length);
|
||||
CLight(CGameWorld *pGameWorld, vec2 Pos, float Rotation, int Length);
|
||||
|
||||
virtual void Reset();
|
||||
virtual void Tick();
|
||||
|
|
|
@ -56,6 +56,7 @@ void CPickup::Tick()
|
|||
}*/
|
||||
// Check if a player intersected us
|
||||
CCharacter *pChr = GameServer()->m_World.ClosestCharacter(m_Pos, 20.0f, 0);
|
||||
CCharacter *pChr2=pChr;
|
||||
if(pChr && pChr->IsAlive())
|
||||
{
|
||||
bool sound = false;
|
||||
|
@ -134,6 +135,77 @@ void CPickup::Tick()
|
|||
m_SpawnTick = Server()->Tick() + Server()->TickSpeed() * RespawnTime;
|
||||
}*/
|
||||
}
|
||||
pChr=0;
|
||||
pChr = GameServer()->m_World.ClosestCharacter(m_Pos, 20.0f, pChr2);
|
||||
if(pChr && pChr->IsAlive())
|
||||
{
|
||||
bool sound = false;
|
||||
// player picked us up, is someone was hooking us, let them go
|
||||
int RespawnTime = -1;
|
||||
switch (m_Type)
|
||||
{
|
||||
case POWERUP_HEALTH:
|
||||
if(pChr->Freeze()) GameServer()->CreateSound(m_Pos, SOUND_PICKUP_HEALTH);
|
||||
break;
|
||||
|
||||
case POWERUP_ARMOR:
|
||||
for(int i=WEAPON_SHOTGUN;i<NUM_WEAPONS;i++)
|
||||
{
|
||||
if (pChr->m_aWeapons[i].m_Got)
|
||||
{
|
||||
if(!(pChr->m_FreezeTime && i == WEAPON_NINJA))
|
||||
{
|
||||
pChr->m_aWeapons[i].m_Got = false;
|
||||
pChr->m_aWeapons[i].m_Ammo = 0;
|
||||
sound = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
pChr->m_Ninja.m_ActivationDir=vec2(0,0);
|
||||
pChr->m_Ninja.m_ActivationTick=-500;
|
||||
pChr->m_Ninja.m_CurrentMoveTime=0;
|
||||
if (sound)
|
||||
{
|
||||
pChr->m_LastWeapon = WEAPON_GUN;
|
||||
GameServer()->CreateSound(m_Pos, SOUND_PICKUP_ARMOR);
|
||||
}
|
||||
if(!pChr->m_FreezeTime) pChr->m_ActiveWeapon = WEAPON_HAMMER;
|
||||
break;
|
||||
|
||||
case POWERUP_WEAPON:
|
||||
|
||||
if(m_Subtype >= 0 && m_Subtype < NUM_WEAPONS && (!pChr->m_aWeapons[m_Subtype].m_Got || (pChr->m_aWeapons[m_Subtype].m_Ammo != -1 && !pChr->m_FreezeTime)))
|
||||
{
|
||||
if(pChr->GiveWeapon(m_Subtype, -1))
|
||||
{
|
||||
//RespawnTime = g_pData->m_aPickups[m_Type].m_Respawntime;
|
||||
|
||||
if(m_Subtype == WEAPON_GRENADE)
|
||||
GameServer()->CreateSound(m_Pos, SOUND_PICKUP_GRENADE);
|
||||
else if(m_Subtype == WEAPON_SHOTGUN)
|
||||
GameServer()->CreateSound(m_Pos, SOUND_PICKUP_SHOTGUN);
|
||||
else if(m_Subtype == WEAPON_RIFLE)
|
||||
GameServer()->CreateSound(m_Pos, SOUND_PICKUP_SHOTGUN);
|
||||
|
||||
if(pChr->GetPlayer())
|
||||
GameServer()->SendWeaponPickup(pChr->GetPlayer()->GetCID(), m_Subtype);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case POWERUP_NINJA:
|
||||
{
|
||||
// activate ninja on target player
|
||||
if(!pChr->m_FreezeTime) pChr->GiveNinja();
|
||||
//RespawnTime = g_pData->m_aPickups[m_Type].m_Respawntime;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
void CPickup::Snap(int SnappingClient)
|
||||
|
|
|
@ -70,9 +70,9 @@ void CPlasma::Tick()
|
|||
|
||||
}
|
||||
|
||||
void CPlasma::Snap(int snapping_client)
|
||||
void CPlasma::Snap(int SnappingClient)
|
||||
{
|
||||
if(NetworkClipped(snapping_client))
|
||||
if(NetworkClipped(SnappingClient))
|
||||
return;
|
||||
|
||||
CNetObj_Laser *pObj = static_cast<CNetObj_Laser *>(Server()->SnapNewItem(NETOBJTYPE_LASER, m_Id, sizeof(CNetObj_Laser)));
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
|
||||
virtual void Reset();
|
||||
virtual void Tick();
|
||||
virtual void Snap(int snapping_client);
|
||||
virtual void Snap(int SnappingClient);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
#include <engine/shared/config.h>
|
||||
#include "projectile.h"
|
||||
|
||||
CProjectile::CProjectile(
|
||||
CProjectile::CProjectile
|
||||
(
|
||||
CGameWorld *pGameWorld,
|
||||
int Type,
|
||||
int Owner,
|
||||
|
@ -14,7 +15,8 @@ CProjectile::CProjectile(
|
|||
bool Explosive,
|
||||
float Force,
|
||||
int SoundImpact,
|
||||
int Weapon)
|
||||
int Weapon
|
||||
)
|
||||
: CEntity(pGameWorld, NETOBJTYPE_PROJECTILE)
|
||||
{
|
||||
m_Type = Type;
|
||||
|
@ -79,6 +81,12 @@ void CProjectile::SetBouncing(int Value)
|
|||
|
||||
void CProjectile::Tick()
|
||||
{
|
||||
if(g_Config.m_SvShotgunReset > m_LastRestart && m_Owner == -1)
|
||||
{
|
||||
m_Pos = m_StartPos;
|
||||
m_Direction = m_StartDir;
|
||||
m_StartTick = Server()->Tick();
|
||||
}
|
||||
float Pt = (Server()->Tick()-m_StartTick-1)/(float)Server()->TickSpeed();
|
||||
float Ct = (Server()->Tick()-m_StartTick)/(float)Server()->TickSpeed();
|
||||
vec2 PrevPos = GetPos(Pt);
|
||||
|
@ -118,12 +126,6 @@ void CProjectile::Tick()
|
|||
{
|
||||
m_StartTick = Server()->Tick();
|
||||
m_Pos = NewPos;
|
||||
if(g_Config.m_SvShotgunReset > m_LastRestart)
|
||||
{
|
||||
m_Pos = m_StartPos;
|
||||
m_Direction = m_StartDir;
|
||||
m_StartTick = Server()->Tick();
|
||||
}
|
||||
if (m_Bouncing == 1)
|
||||
{
|
||||
m_PrevLastBounce.x = m_LastBounce.x;
|
||||
|
|
|
@ -4,8 +4,20 @@
|
|||
class CProjectile : public CEntity
|
||||
{
|
||||
public:
|
||||
CProjectile(CGameWorld *pGameWorld, int Type, int Owner, vec2 Pos, vec2 Dir, int Span,
|
||||
bool Freeeze, bool Explosive, float Force, int SoundImpact, int Weapon);
|
||||
CProjectile
|
||||
(
|
||||
CGameWorld *pGameWorld,
|
||||
int Type,
|
||||
int Owner,
|
||||
vec2 Pos,
|
||||
vec2 Dir,
|
||||
int Span,
|
||||
bool Freeeze,
|
||||
bool Explosive,
|
||||
float Force,
|
||||
int SoundImpact,
|
||||
int Weapon
|
||||
);
|
||||
|
||||
vec2 GetPos(float Time);
|
||||
void FillInfo(CNetObj_Projectile *pProj);
|
||||
|
|
|
@ -13,25 +13,43 @@ CTrigger::CTrigger(CGameWorld *pGameWorld, vec2 Pos, CEntity *Target)
|
|||
{
|
||||
m_Pos = Pos;
|
||||
m_Target = Target;
|
||||
for(int i = 0; i < MAX_CLIENTS; ++i) {
|
||||
m_TeamActivated[i] = false;
|
||||
}
|
||||
|
||||
|
||||
GameWorld()->InsertEntity(this);
|
||||
}
|
||||
|
||||
bool CTrigger::HitCharacter()
|
||||
{
|
||||
CCharacter *pChr = GameServer()->m_World.ClosestCharacter(m_Pos, 20.0f, 0);
|
||||
return (!pChr) ? false : true;
|
||||
CCharacter *Ents[16];
|
||||
|
||||
Reset();
|
||||
|
||||
int Num = GameServer()->m_World.FindEntities(m_Pos, 20.0f, (CEntity**)Ents, 16, NETOBJTYPE_CHARACTER);
|
||||
if(Num <= 0) {
|
||||
return false;
|
||||
} else {
|
||||
for (int i = 0; i < Num; i++)
|
||||
{
|
||||
m_TeamActivated[Ents[i]->Team()] = true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void CTrigger::OpenDoor(int Tick)
|
||||
{
|
||||
CDoor *connectedDoor = (CDoor*) m_Target;
|
||||
connectedDoor->Open(Tick);
|
||||
CDoor *ConnectedDoor = (CDoor*) m_Target;
|
||||
ConnectedDoor->Open(Tick, m_TeamActivated);
|
||||
}
|
||||
|
||||
void CTrigger::Reset()
|
||||
{
|
||||
return;
|
||||
for(int i = 0; i < MAX_CLIENTS; ++i) {
|
||||
m_TeamActivated[i] = false;
|
||||
}
|
||||
}
|
||||
|
||||
void CTrigger::Tick()
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
class CTrigger : public CEntity
|
||||
{
|
||||
CEntity *m_Target;
|
||||
bool m_TeamActivated[MAX_CLIENTS];
|
||||
|
||||
bool HitCharacter();
|
||||
void OpenDoor(int Tick);
|
||||
|
|
|
@ -241,48 +241,48 @@ bool IGameController::OnEntity(int Index, vec2 Pos, bool Front)
|
|||
sides2[6]=GameServer()->Collision()->Entity(x-2,y, Front);
|
||||
sides2[7]=GameServer()->Collision()->Entity(x-2,y+2, Front);
|
||||
|
||||
float ang_speed;
|
||||
int ind=Index-ENTITY_LASER_STOP;
|
||||
int m;
|
||||
if (ind<0)
|
||||
float AngularSpeed;
|
||||
int Ind=Index-ENTITY_LASER_STOP;
|
||||
int M;
|
||||
if (Ind<0)
|
||||
{
|
||||
ind=-ind;
|
||||
m=1;
|
||||
Ind=-Ind;
|
||||
M=1;
|
||||
}
|
||||
else if(ind==0)
|
||||
m=0;
|
||||
else if(Ind==0)
|
||||
M=0;
|
||||
else
|
||||
m=-1;
|
||||
M=-1;
|
||||
|
||||
|
||||
if (ind==0)
|
||||
ang_speed=0.0f;
|
||||
else if (ind==1)
|
||||
ang_speed=pi/360;
|
||||
else if (ind==2)
|
||||
ang_speed=pi/180;
|
||||
else if (ind==3)
|
||||
ang_speed=pi/90;
|
||||
ang_speed*=m;
|
||||
if (Ind==0)
|
||||
AngularSpeed=0.0f;
|
||||
else if (Ind==1)
|
||||
AngularSpeed=pi/360;
|
||||
else if (Ind==2)
|
||||
AngularSpeed=pi/180;
|
||||
else if (Ind==3)
|
||||
AngularSpeed=pi/90;
|
||||
AngularSpeed*=M;
|
||||
|
||||
for(int i=0; i<8;i++)
|
||||
{
|
||||
if (sides[i] >= ENTITY_LASER_SHORT && sides[i] <= ENTITY_LASER_LONG)
|
||||
{
|
||||
CLight *lgt = new CLight(&GameServer()->m_World, Pos, pi/4*i,32*3 + 32*(sides[i] - ENTITY_LASER_SHORT)*3);
|
||||
lgt->ang_speed=ang_speed;
|
||||
CLight *Lgt = new CLight(&GameServer()->m_World, Pos, pi/4*i,32*3 + 32*(sides[i] - ENTITY_LASER_SHORT)*3);
|
||||
Lgt->m_AngularSpeed=AngularSpeed;
|
||||
if (sides2[i]>=ENTITY_LASER_C_SLOW && sides2[i]<=ENTITY_LASER_C_FAST)
|
||||
{
|
||||
lgt->speed=1+(sides2[i]-ENTITY_LASER_C_SLOW)*2;
|
||||
lgt->cur_length=lgt->length;
|
||||
Lgt->m_Speed=1+(sides2[i]-ENTITY_LASER_C_SLOW)*2;
|
||||
Lgt->m_CurveLength=Lgt->m_Length;
|
||||
}
|
||||
else if(sides2[i]>=ENTITY_LASER_O_SLOW && sides2[i]<=ENTITY_LASER_O_FAST)
|
||||
{
|
||||
lgt->speed=1+(sides2[i]-ENTITY_LASER_O_SLOW)*2;
|
||||
lgt->cur_length=0;
|
||||
Lgt->m_Speed=1+(sides2[i]-ENTITY_LASER_O_SLOW)*2;
|
||||
Lgt->m_CurveLength=0;
|
||||
}
|
||||
else
|
||||
lgt->cur_length=lgt->length;
|
||||
Lgt->m_CurveLength=Lgt->m_Length;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -198,7 +198,6 @@ CCharacter *CGameWorld::IntersectCharacter(vec2 Pos0, vec2 Pos1, float Radius, v
|
|||
return pClosest;
|
||||
}
|
||||
|
||||
|
||||
CCharacter *CGameWorld::ClosestCharacter(vec2 Pos, float Radius, CEntity *pNotThis)
|
||||
{
|
||||
// Find other players
|
||||
|
|
|
@ -61,18 +61,18 @@ public:
|
|||
Number of entities found and added to the ents array.
|
||||
*/
|
||||
int FindEntities(vec2 Pos, float Radius, CEntity **ppEnts, int Max, int Type = -1);
|
||||
|
||||
|
||||
/*
|
||||
Function: interserct_CCharacter
|
||||
Finds the closest CCharacter that intersects the line.
|
||||
|
||||
Function: InterserctCharacters
|
||||
Finds the CCharacters that intersects the line. // made for types lasers=1 and doors=0
|
||||
|
||||
Arguments:
|
||||
pos0 - Start position
|
||||
pos2 - End position
|
||||
radius - How for from the line the CCharacter is allowed to be.
|
||||
new_pos - Intersection position
|
||||
notthis - Entity to ignore intersecting with
|
||||
|
||||
|
||||
Returns:
|
||||
Returns a pointer to the closest hit or NULL of there is no intersection.
|
||||
*/
|
||||
|
|
|
@ -4,95 +4,95 @@
|
|||
|
||||
|
||||
// client
|
||||
MACRO_CONFIG_INT(ClPredict, cl_predict, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Predict client movements")
|
||||
MACRO_CONFIG_INT(ClNameplates, cl_nameplates, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show nameplates")
|
||||
MACRO_CONFIG_INT(ClNameplatesAlways, cl_nameplates_always, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Always show nameplats disregarding of distance")
|
||||
MACRO_CONFIG_INT(ClAutoswitchWeapons, cl_autoswitch_weapons, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Auto switch weapon on pickup")
|
||||
MACRO_CONFIG_INT(ClPredict, cl_predict, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Predict client movements",0)
|
||||
MACRO_CONFIG_INT(ClNameplates, cl_nameplates, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show nameplates",0)
|
||||
MACRO_CONFIG_INT(ClNameplatesAlways, cl_nameplates_always, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Always show nameplats disregarding of distance",0)
|
||||
MACRO_CONFIG_INT(ClAutoswitchWeapons, cl_autoswitch_weapons, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Auto switch weapon on pickup",0)
|
||||
|
||||
MACRO_CONFIG_INT(ClShowfps, cl_showfps, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show ingame FPS counter")
|
||||
MACRO_CONFIG_INT(ClShowfps, cl_showfps, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show ingame FPS counter",0)
|
||||
|
||||
MACRO_CONFIG_INT(ClAirjumpindicator, cl_airjumpindicator, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
|
||||
MACRO_CONFIG_INT(ClThreadsoundloading, cl_threadsoundloading, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
|
||||
MACRO_CONFIG_INT(ClAirjumpindicator, cl_airjumpindicator, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "",0)
|
||||
MACRO_CONFIG_INT(ClThreadsoundloading, cl_threadsoundloading, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "",0)
|
||||
|
||||
MACRO_CONFIG_INT(ClWarningTeambalance, cl_warning_teambalance, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Warn about team balance")
|
||||
MACRO_CONFIG_INT(ClWarningTeambalance, cl_warning_teambalance, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Warn about team balance",0)
|
||||
|
||||
MACRO_CONFIG_INT(ClMouseDeadzone, cl_mouse_deadzone, 300, 0, 0, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
|
||||
MACRO_CONFIG_INT(ClMouseFollowfactor, cl_mouse_followfactor, 60, 0, 200, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
|
||||
MACRO_CONFIG_INT(ClMouseMaxDistance, cl_mouse_max_distance, 800, 0, 0, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
|
||||
MACRO_CONFIG_INT(ClMouseDeadzone, cl_mouse_deadzone, 300, 0, 0, CFGFLAG_CLIENT|CFGFLAG_SAVE, "",0)
|
||||
MACRO_CONFIG_INT(ClMouseFollowfactor, cl_mouse_followfactor, 60, 0, 200, CFGFLAG_CLIENT|CFGFLAG_SAVE, "",0)
|
||||
MACRO_CONFIG_INT(ClMouseMaxDistance, cl_mouse_max_distance, 800, 0, 0, CFGFLAG_CLIENT|CFGFLAG_SAVE, "",0)
|
||||
|
||||
MACRO_CONFIG_INT(ClRaceCheats, cl_race_cheats, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
|
||||
MACRO_CONFIG_INT(ClRaceCheats, cl_race_cheats, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "",0)
|
||||
|
||||
MACRO_CONFIG_INT(EdShowkeys, ed_showkeys, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
|
||||
MACRO_CONFIG_INT(EdShowkeys, ed_showkeys, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "",0)
|
||||
|
||||
MACRO_CONFIG_INT(ClFlow, cl_flow, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
|
||||
MACRO_CONFIG_INT(ClFlow, cl_flow, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "",0)
|
||||
|
||||
MACRO_CONFIG_INT(ClShowWelcome, cl_show_welcome, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
|
||||
MACRO_CONFIG_INT(ClMotdTime, cl_motd_time, 10, 0, 100, CFGFLAG_CLIENT|CFGFLAG_SAVE, "How long to show the server message of the day")
|
||||
MACRO_CONFIG_INT(ClShowWelcome, cl_show_welcome, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "",0)
|
||||
MACRO_CONFIG_INT(ClMotdTime, cl_motd_time, 10, 0, 100, CFGFLAG_CLIENT|CFGFLAG_SAVE, "How long to show the server message of the day",0)
|
||||
|
||||
MACRO_CONFIG_STR(ClVersionServer, cl_version_server, 100, "version.teeworlds.com", CFGFLAG_CLIENT|CFGFLAG_SAVE, "Server to use to check for new versions")
|
||||
MACRO_CONFIG_STR(ClVersionServer, cl_version_server, 100, "version.teeworlds.com", CFGFLAG_CLIENT|CFGFLAG_SAVE, "Server to use to check for new versions",0)
|
||||
|
||||
MACRO_CONFIG_STR(ClLanguagefile, cl_languagefile, 255, "", CFGFLAG_CLIENT|CFGFLAG_SAVE, "What language file to use")
|
||||
MACRO_CONFIG_STR(ClLanguagefile, cl_languagefile, 255, "", CFGFLAG_CLIENT|CFGFLAG_SAVE, "What language file to use",0)
|
||||
|
||||
MACRO_CONFIG_INT(PlayerUseCustomColor, player_use_custom_color, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Toggles usage of custom colors")
|
||||
MACRO_CONFIG_INT(PlayerColorBody, player_color_body, 65408, 0, 0xFFFFFF, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Player body color")
|
||||
MACRO_CONFIG_INT(PlayerColorFeet, player_color_feet, 65408, 0, 0xFFFFFF, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Player feet color")
|
||||
MACRO_CONFIG_STR(PlayerSkin, player_skin, 64, "default", CFGFLAG_CLIENT|CFGFLAG_SAVE, "Player skin")
|
||||
MACRO_CONFIG_INT(PlayerUseCustomColor, player_use_custom_color, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Toggles usage of custom colors",0)
|
||||
MACRO_CONFIG_INT(PlayerColorBody, player_color_body, 65408, 0, 0xFFFFFF, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Player body color",0)
|
||||
MACRO_CONFIG_INT(PlayerColorFeet, player_color_feet, 65408, 0, 0xFFFFFF, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Player feet color",0)
|
||||
MACRO_CONFIG_STR(PlayerSkin, player_skin, 64, "default", CFGFLAG_CLIENT|CFGFLAG_SAVE, "Player skin",0)
|
||||
|
||||
MACRO_CONFIG_INT(UiPage, ui_page, 5, 0, 9, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface page")
|
||||
MACRO_CONFIG_INT(UiToolboxPage, ui_toolbox_page, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Toolbox page")
|
||||
MACRO_CONFIG_STR(UiServerAddress, ui_server_address, 25, "localhost:8303", CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface server address")
|
||||
MACRO_CONFIG_INT(UiScale, ui_scale, 100, 1, 100000, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface scale")
|
||||
MACRO_CONFIG_INT(UiPage, ui_page, 5, 0, 9, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface page",0)
|
||||
MACRO_CONFIG_INT(UiToolboxPage, ui_toolbox_page, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Toolbox page",0)
|
||||
MACRO_CONFIG_STR(UiServerAddress, ui_server_address, 25, "localhost:8303", CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface server address",0)
|
||||
MACRO_CONFIG_INT(UiScale, ui_scale, 100, 1, 100000, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface scale",0)
|
||||
|
||||
MACRO_CONFIG_INT(UiColorHue, ui_color_hue, 160, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface color hue")
|
||||
MACRO_CONFIG_INT(UiColorSat, ui_color_sat, 70, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface color saturation")
|
||||
MACRO_CONFIG_INT(UiColorLht, ui_color_lht, 175, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface color lightness")
|
||||
MACRO_CONFIG_INT(UiColorAlpha, ui_color_alpha, 228, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface alpha")
|
||||
MACRO_CONFIG_INT(UiColorHue, ui_color_hue, 160, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface color hue",0)
|
||||
MACRO_CONFIG_INT(UiColorSat, ui_color_sat, 70, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface color saturation",0)
|
||||
MACRO_CONFIG_INT(UiColorLht, ui_color_lht, 175, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface color lightness",0)
|
||||
MACRO_CONFIG_INT(UiColorAlpha, ui_color_alpha, 228, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface alpha",0)
|
||||
|
||||
MACRO_CONFIG_INT(GfxNoclip, gfx_noclip, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Disable clipping")
|
||||
MACRO_CONFIG_INT(GfxClearFull, gfx_full_clear, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Only show the game tile")
|
||||
MACRO_CONFIG_INT(GfxNoclip, gfx_noclip, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Disable clipping",0)
|
||||
MACRO_CONFIG_INT(GfxClearFull, gfx_full_clear, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Only show the game tile",0)
|
||||
|
||||
/* race - client */
|
||||
MACRO_CONFIG_INT(ClAutoRecord, cl_auto_record, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Save the best demo of each race")
|
||||
MACRO_CONFIG_INT(ClShowOthers, cl_show_others, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Turn other players off in race")
|
||||
MACRO_CONFIG_INT(ClRenderSpeedmeter, cl_render_speedmeter, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Render in game speedmeter")
|
||||
MACRO_CONFIG_INT(ClSpeedmeterAccel, cl_speedmeter_accel, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show acceleration")
|
||||
MACRO_CONFIG_INT(ClShowCheckpointDiff, cl_show_checkpoint_diff, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show checkpoint diff")
|
||||
MACRO_CONFIG_INT(ClShowRecords, cl_show_records, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show records")
|
||||
MACRO_CONFIG_INT(ClShowServerRecord, cl_show_server_record, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show server record")
|
||||
MACRO_CONFIG_INT(ClShowLocalRecord, cl_show_local_record, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show personal best")
|
||||
MACRO_CONFIG_INT(ClAutoRecord, cl_auto_record, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Save the best demo of each race",0)
|
||||
MACRO_CONFIG_INT(ClShowOthers, cl_show_others, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Turn other players off in race",0)
|
||||
MACRO_CONFIG_INT(ClRenderSpeedmeter, cl_render_speedmeter, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Render in game speedmeter",0)
|
||||
MACRO_CONFIG_INT(ClSpeedmeterAccel, cl_speedmeter_accel, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show acceleration",0)
|
||||
MACRO_CONFIG_INT(ClShowCheckpointDiff, cl_show_checkpoint_diff, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show checkpoint diff",0)
|
||||
MACRO_CONFIG_INT(ClShowRecords, cl_show_records, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show records",0)
|
||||
MACRO_CONFIG_INT(ClShowServerRecord, cl_show_server_record, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show server record",0)
|
||||
MACRO_CONFIG_INT(ClShowLocalRecord, cl_show_local_record, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show personal best",0)
|
||||
|
||||
/* DownloadExtension | Mod by KillaBilla */
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionSize, cl_downloadextension_size, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionSpeed, cl_downloadextension_speed, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionTimeElapsed, cl_downloadextension_timeelapsed, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionTimeRemaining, cl_downloadextension_timeremaining, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionStatusPercent, cl_downloadextension_statuspercent, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionStatusBar, cl_downloadextension_statusbar, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionStatusBar_r, cl_downloadextension_statusbar_r, 255, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionStatusBar_g, cl_downloadextension_statusbar_g, 255, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionStatusBar_b, cl_downloadextension_statusbar_b, 255, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionStatusBar_a, cl_downloadextension_statusbar_a, 191, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionSize, cl_downloadextension_size, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "",0)
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionSpeed, cl_downloadextension_speed, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "",0)
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionTimeElapsed, cl_downloadextension_timeelapsed, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "",0)
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionTimeRemaining, cl_downloadextension_timeremaining, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "",0)
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionStatusPercent, cl_downloadextension_statuspercent, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "",0)
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionStatusBar, cl_downloadextension_statusbar, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "",0)
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionStatusBar_r, cl_downloadextension_statusbar_r, 255, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "",0)
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionStatusBar_g, cl_downloadextension_statusbar_g, 255, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "",0)
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionStatusBar_b, cl_downloadextension_statusbar_b, 255, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "",0)
|
||||
MACRO_CONFIG_INT(ClDownloadExtensionStatusBar_a, cl_downloadextension_statusbar_a, 191, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "",0)
|
||||
|
||||
MACRO_CONFIG_INT(ClArrows, cl_arrows, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show arrows in place of text for player streams")
|
||||
MACRO_CONFIG_INT(ClTextSize, cl_text_size, 100, 20, 200, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Text size (%)")
|
||||
MACRO_CONFIG_INT(ClArrows, cl_arrows, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show arrows in place of text for player streams",0)
|
||||
MACRO_CONFIG_INT(ClTextSize, cl_text_size, 100, 20, 200, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Text size (%)",0)
|
||||
|
||||
// server
|
||||
|
||||
/*MACRO_CONFIG_INT(SvTeamdamage, sv_teamdamage, 0, 0, 1, CFGFLAG_SERVER, "Team damage")
|
||||
MACRO_CONFIG_STR(SvMaprotation, sv_maprotation, 768, "", CFGFLAG_SERVER, "Maps to rotate between")
|
||||
MACRO_CONFIG_INT(SvRoundsPerMap, sv_rounds_per_map, 1, 1, 100, CFGFLAG_SERVER, "Number of rounds on each map before rotating")
|
||||
MACRO_CONFIG_INT(SvPowerups, sv_powerups, 1, 0, 1, CFGFLAG_SERVER, "Allow powerups like ninja")
|
||||
MACRO_CONFIG_INT(SvScorelimit, sv_scorelimit, 20, 0, 1000, CFGFLAG_SERVER, "Score limit (0 disables)")
|
||||
MACRO_CONFIG_INT(SvTimelimit, sv_timelimit, 0, 0, 1000, CFGFLAG_SERVER, "Time limit in minutes (0 disables)")
|
||||
MACRO_CONFIG_STR(SvGametype, sv_gametype, 32, "dm", CFGFLAG_SERVER, "Game type (dm, tdm, ctf)")*/
|
||||
//MACRO_CONFIG_INT(SvTeambalanceTime, sv_teambalance_time, 1, 0, 1000, CFGFLAG_SERVER, "How many minutes to wait before autobalancing teams")
|
||||
//MACRO_CONFIG_INT(SvVoteScorelimit, sv_vote_scorelimit, 0, 0, 1, CFGFLAG_SERVER, "Allow voting to change score limit")
|
||||
//MACRO_CONFIG_INT(SvVoteTimelimit, sv_vote_timelimit, 0, 0, 1, CFGFLAG_SERVER, "Allow voting to change time limit")
|
||||
/*MACRO_CONFIG_INT(SvTeamdamage, sv_teamdamage, 0, 0, 1, CFGFLAG_SERVER, "Team damage",0)
|
||||
MACRO_CONFIG_STR(SvMaprotation, sv_maprotation, 768, "", CFGFLAG_SERVER, "Maps to rotate between",0)
|
||||
MACRO_CONFIG_INT(SvRoundsPerMap, sv_rounds_per_map, 1, 1, 100, CFGFLAG_SERVER, "Number of rounds on each map before rotating",0)
|
||||
MACRO_CONFIG_INT(SvPowerups, sv_powerups, 1, 0, 1, CFGFLAG_SERVER, "Allow powerups like ninja",0)
|
||||
MACRO_CONFIG_INT(SvScorelimit, sv_scorelimit, 20, 0, 1000, CFGFLAG_SERVER, "Score limit (0 disables)",0)
|
||||
MACRO_CONFIG_INT(SvTimelimit, sv_timelimit, 0, 0, 1000, CFGFLAG_SERVER, "Time limit in minutes (0 disables)",0)
|
||||
MACRO_CONFIG_STR(SvGametype, sv_gametype, 32, "dm", CFGFLAG_SERVER, "Game type (dm, tdm, ctf)",0)*/
|
||||
//MACRO_CONFIG_INT(SvTeambalanceTime, sv_teambalance_time, 1, 0, 1000, CFGFLAG_SERVER, "How many minutes to wait before autobalancing teams",0)
|
||||
//MACRO_CONFIG_INT(SvVoteScorelimit, sv_vote_scorelimit, 0, 0, 1, CFGFLAG_SERVER, "Allow voting to change score limit",0)
|
||||
//MACRO_CONFIG_INT(SvVoteTimelimit, sv_vote_timelimit, 0, 0, 1, CFGFLAG_SERVER, "Allow voting to change time limit",0)
|
||||
// debug
|
||||
#ifdef CONF_DEBUG // this one can crash the server if not used correctly
|
||||
MACRO_CONFIG_INT(DbgDummies, dbg_dummies, 0, 0, 15, CFGFLAG_SERVER, "")
|
||||
MACRO_CONFIG_INT(DbgDummies, dbg_dummies, 0, 0, 15, CFGFLAG_SERVER, "",0)
|
||||
#endif
|
||||
|
||||
MACRO_CONFIG_INT(DbgFocus, dbg_focus, 0, 0, 1, CFGFLAG_CLIENT, "")
|
||||
MACRO_CONFIG_INT(DbgTuning, dbg_tuning, 0, 0, 1, CFGFLAG_CLIENT, "")
|
||||
MACRO_CONFIG_INT(DbgFocus, dbg_focus, 0, 0, 1, CFGFLAG_CLIENT, "",0)
|
||||
MACRO_CONFIG_INT(DbgTuning, dbg_tuning, 0, 0, 1, CFGFLAG_CLIENT, "",0)
|
||||
#endif
|
||||
|
|