Compare commits
58 Commits
9a56906be7
...
HEAD
Author | SHA1 | Date | |
---|---|---|---|
f8b9ab46e7 | |||
6ac7912e7c | |||
|
a6a825cf53 | ||
|
5fb51f4ab2 | ||
|
cb3e244885 | ||
|
932e9b2560 | ||
|
48f9f147d8 | ||
|
93bcad39c8 | ||
|
a1776bdc62 | ||
|
2f900a7d30 | ||
|
954999fdd0 | ||
|
4753c3be38 | ||
|
9e9d81ee84 | ||
|
8fb50fd32a | ||
|
8b0c3cd707 | ||
3e6b387e32 | |||
d6d8b078d9 | |||
|
3a70a93b41 | ||
|
56f81d7f18 | ||
|
83407f7895 | ||
|
7d974ecd82 | ||
|
5ac6b8cd19 | ||
|
da9b2b415b | ||
|
835f74065c | ||
|
21d5b05554 | ||
|
704a125223 | ||
|
41039f9b19 | ||
|
231f2c2d69 | ||
84a196ee7d | |||
7e70a4d054 | |||
|
4394864b99 | ||
|
bb7d38ffc2 | ||
|
eed18a76f2 | ||
|
c249947390 | ||
|
d97dad0fc1 | ||
|
a07253fff4 | ||
|
d6b540efef | ||
|
0801553556 | ||
|
01b8737488 | ||
|
cf4ae75cfa | ||
|
94c89b1fca | ||
|
4ec7aea6bd | ||
|
5d1a2e0191 | ||
|
d05aaa1ea4 | ||
|
fbc939f484 | ||
|
bf629517e2 | ||
|
abe7e8e16c | ||
|
4d0abb3ec2 | ||
|
b419d4d984 | ||
|
5fb452136a | ||
|
e962e89983 | ||
|
2288fd7e6d | ||
|
29b08292f9 | ||
|
89c4a9d7a5 | ||
|
1d27a5fdf2 | ||
|
17e193fd46 | ||
|
244bc7a658 | ||
|
ea856189fe |
5
build.bat
Normal file
5
build.bat
Normal file
@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
|
||||
"C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\msbuild.exe" build\iw4x.sln /p:Configuration=Release /p:Platform=Win32
|
||||
|
||||
pause
|
34
cfg/DedicatedConfigsLinux/DedicatedLobbyServer.sh
Normal file
34
cfg/DedicatedConfigsLinux/DedicatedLobbyServer.sh
Normal file
@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IW4x Lobby Server Configuration start-up file
|
||||
# For support visit us on discord https://discord.gg/2ETE8engZM
|
||||
|
||||
# Choose your gamemode of 0-22 of your choice above
|
||||
PlaylistGameMode=1
|
||||
|
||||
# Your Game Server Port. Make sure you Port Forward both UDP & TCP
|
||||
GamePort=28960
|
||||
|
||||
# Offline/Private LAN Party Mode
|
||||
# 0 Disable (Send heartbeats to online serverlist)
|
||||
# 1 Enable (Add to the Local serverlist. Unlisted from Public)
|
||||
LANMode=0
|
||||
|
||||
# Enable logging
|
||||
LogFile=1
|
||||
|
||||
# Load a mod on your server
|
||||
ModFolderName=
|
||||
|
||||
# The name of your edited Playlist from the "userraw" folder goes here (optional)
|
||||
PlaylistFilename=partyserver.cfg
|
||||
|
||||
# Your edited server.cfg in the "userraw" folder goes here...
|
||||
# This is where you edit your hostname, rcon, inactivity, etc
|
||||
# (Optional)
|
||||
ServerFilename=serverlan.cfg
|
||||
|
||||
# Remove this line if automatic updates on start should be disabled
|
||||
./alterware-launcher --update
|
||||
|
||||
wine iw4x.exe -dedicated -stdout +set fs_game "$ModFolderName" +set sv_lanonly "$LANMode" +set net_port "$GamePort" +exec "$ServerFilename" +set logfile "$LogFile" +set party_enable "1" +set playlistFilename "$PlaylistFilename" +playlist "$PlaylistGameMode"
|
34
cfg/DedicatedConfigsLinux/DedicatedLobbyServerLAN.sh
Normal file
34
cfg/DedicatedConfigsLinux/DedicatedLobbyServerLAN.sh
Normal file
@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IW4x Lobby Server Configuration start-up file
|
||||
# For support visit us on discord https://discord.gg/2ETE8engZM
|
||||
|
||||
# Choose your gamemode of 0-22 of your choice above
|
||||
PlaylistGameMode=1
|
||||
|
||||
# Your Game Server Port. Make sure you Port Forward both UDP & TCP
|
||||
GamePort=28960
|
||||
|
||||
# Offline/Private LAN Party Mode
|
||||
# 0 Disable (Send heartbeats to online serverlist)
|
||||
# 1 Enable (Add to the Local serverlist. Unlisted from Public)
|
||||
LANMode=1
|
||||
|
||||
# Enable logging
|
||||
LogFile=1
|
||||
|
||||
# Load a mod on your server
|
||||
ModFolderName=
|
||||
|
||||
# The name of your edited Playlist from the "userraw" folder goes here (optional)
|
||||
PlaylistFilename=myplaylists.info
|
||||
|
||||
# Your edited server.cfg in the "userraw" folder goes here...
|
||||
# This is where you edit your hostname, rcon, inactivity, etc
|
||||
# (Optional)
|
||||
ServerFilename=partyserverlan.cfg
|
||||
|
||||
# Remove this line if automatic updates on start should be disabled
|
||||
./alterware-launcher --update
|
||||
|
||||
wine iw4x.exe -dedicated -stdout +set fs_game "$ModFolderName" +set sv_lanonly "$LANMode" +set net_port "$GamePort" +exec "$ServerFilename" +set logfile "$LogFile" +set party_enable "1" +set playlistFilename "$PlaylistFilename" +playlist "$PlaylistGameMode"
|
29
cfg/DedicatedConfigsLinux/DedicatedServer.sh
Normal file
29
cfg/DedicatedConfigsLinux/DedicatedServer.sh
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IW4x Dedicated Server Configuration start-up file
|
||||
# For support visit us on discord https://discord.gg/2ETE8engZM
|
||||
|
||||
|
||||
# Your Game Server Port. Make sure you Port Forward both UDP & TCP
|
||||
GamePort=28960
|
||||
|
||||
# Offline/Private LAN Party Mode
|
||||
# 0 Disable (Send heartbeats to online serverlist)
|
||||
# 1 Enable (Add to the Local serverlist. Unlisted from Public)
|
||||
LANMode=0
|
||||
|
||||
# Enable logging
|
||||
LogFile=1
|
||||
|
||||
# Load a mod on your server
|
||||
ModFolderName=
|
||||
|
||||
# Your edited server.cfg in the "userraw" folder goes here...
|
||||
# This is where you edit your hostname, rcon, inactivity, etc
|
||||
# (Optional)
|
||||
ServerFilename=server.cfg
|
||||
|
||||
# Remove this line if automatic updates on start should be disabled
|
||||
./alterware-launcher --update
|
||||
|
||||
wine iw4x.exe -dedicated -stdout +set fs_game "$ModFolderName" +set sv_lanonly "$LANMode" +set net_port "$GamePort" +exec "$ServerFilename" +set logfile "$LogFile" +set party_enable "0" +map_rotate
|
29
cfg/DedicatedConfigsLinux/DedicatedServerLAN.sh
Normal file
29
cfg/DedicatedConfigsLinux/DedicatedServerLAN.sh
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IW4x Dedicated Server Configuration start-up file
|
||||
# For support visit us on discord https://discord.gg/2ETE8engZM
|
||||
|
||||
|
||||
# Your Game Server Port. Make sure you Port Forward both UDP & TCP
|
||||
GamePort=28960
|
||||
|
||||
# Offline/Private LAN Party Mode
|
||||
# 0 Disable (Send heartbeats to online serverlist)
|
||||
# 1 Enable (Add to the Local serverlist. Unlisted from Public)
|
||||
LANMode=1
|
||||
|
||||
# Enable logging
|
||||
LogFile=1
|
||||
|
||||
# Load a mod on your server
|
||||
ModFolderName=
|
||||
|
||||
# Your edited server.cfg in the "userraw" folder goes here...
|
||||
# This is where you edit your hostname, rcon, inactivity, etc
|
||||
# (Optional)
|
||||
ServerFilename=serverlan.cfg
|
||||
|
||||
# Remove this line if automatic updates on start should be disabled
|
||||
./alterware-launcher --update
|
||||
|
||||
wine iw4x.exe -dedicated -stdout +set fs_game "$ModFolderName" +set sv_lanonly "$LANMode" +set net_port "$GamePort" +exec "$ServerFilename" +set logfile "$LogFile" +set party_enable "0" +map_rotate
|
1938
cfg/DedicatedConfigsLinux/userraw/LANPlaylist.info
Normal file
1938
cfg/DedicatedConfigsLinux/userraw/LANPlaylist.info
Normal file
File diff suppressed because it is too large
Load Diff
1919
cfg/DedicatedConfigsLinux/userraw/myplaylists.info
Normal file
1919
cfg/DedicatedConfigsLinux/userraw/myplaylists.info
Normal file
File diff suppressed because it is too large
Load Diff
189
cfg/DedicatedConfigsLinux/userraw/partyserver.cfg
Normal file
189
cfg/DedicatedConfigsLinux/userraw/partyserver.cfg
Normal file
@ -0,0 +1,189 @@
|
||||
///////////////////////////////////////////////////
|
||||
/// IW4x Server Configuration file //
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
// SERVER NAME & COLORS TIPS //
|
||||
///////////////////////////////////////////////////
|
||||
// //
|
||||
// ^1 Red //
|
||||
// ^2 Green //
|
||||
// ^3 yellow //
|
||||
// ^4 Blue //
|
||||
// ^5 Cyan //
|
||||
// ^6 Pink //
|
||||
// ^7 White //
|
||||
// ^8 Depends on the team colors playing. //
|
||||
// ^9 grey //
|
||||
// ^0 Black //
|
||||
// ^: Rainbow colors //
|
||||
// //
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
|
||||
set sv_hostname "^2IW4x^7 Default Lobby Server" // Sets the server hostname
|
||||
set sv_motd "" // Sets a custom motd which is shown on the intel message loadscreen when a player joins. leave blank for defualt intel messages.
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// ADMIN INFO (Optional) //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set _Admin "" // Your username.
|
||||
set _Email "" // E-mail address. you can leave blank
|
||||
set _Website "" // Website
|
||||
set _Location "Earth" // Location
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Web Server Downloading (Optional) //
|
||||
//////////////////////////////////////////////////
|
||||
//set sv_wwwDownload "1" // Allow downloading maps and mods from different server instead of the game server.
|
||||
//set sv_wwwBaseUrl "http://" // http-Redirect to usermaps & mods folder on a web server. https does NOT work!
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// NON-GAMEPLAY CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set dedicated 0 // True if this is a dedicated server. (0-2) Default is 0 (= listen server). 1 (= dedicated LAN server), 2 (= dedicated internet server).
|
||||
set rcon_password "" // Access to your server to change stuff remotely or ingame. empty disabled
|
||||
set rcon_timeout "100" // Minimum allowed interval between rcon messages per IP address
|
||||
set sv_securityLevel "23" // Configures the servers security level.
|
||||
set sv_customTextColor "" // custom color for ^;
|
||||
set g_password "" // Password Protected Server. Leave blank if you want players to join or set password if you want to keep public out.
|
||||
set g_inactivity "380" // Enable auto kick feature for idle/AFK players
|
||||
set g_inactivitySpectator "500" // Time in seconds before a spectator gets kicked
|
||||
set logfile "2" // Enable loging 1-2? enable. 0 disable. Leave it on if you plan on using B3 or IW4MAdmin.
|
||||
set g_logSync "1" // 1 always flush games_mp.log, 0 only flush on game end
|
||||
set g_log "logs/lobby_games_mp.log" // Gamelog filename. If you edit this..make sure you change B3.xml if you have bigbrotherbot. IW4MAdmin auto-detects however.
|
||||
set g_allowVote "0" // Enable voting on this server
|
||||
set sv_votesRequired "0" // Votes required for a vote to pass. Settings this to 0 will calculate the required votes based on the number of players (players / 2 + 1)
|
||||
set sv_allowClientConsole "1" // Enable or Disable players ability to access server commands
|
||||
set sv_maxclients "18" // Max players in your server.
|
||||
set party_maxplayers "18" // ^^Same as above for some weird reason^^^
|
||||
set sv_maxPing "0" // Maximum ping allowed during connection, any higher and players will get kicked. ( If you get 'server is for low ping players only' which happens to custom dlc, set this back to 0)
|
||||
set sv_timeout "20" // Timeout time period. You will timeout after (20) seconds when attempting to connect or if you are getting connection interruptions
|
||||
set sv_reconnectlimit "3" // How many times you can try to reconnect
|
||||
set com_logFilter "1" // Removes ~95% of unneeded lines from the log.
|
||||
set sv_pure "0" // verifying cilent files
|
||||
set sv_sayName "^7Console" // name server-side 'say' commands show up as
|
||||
set sv_floodProtect "1" // Chat Spam Protection
|
||||
set sv_kickBanTime "3600" // Kick Ban Duration. Time before player can re-join the server after getting kicked.
|
||||
set sv_randomBotNames "1" // Randomize the names.
|
||||
set sv_replaceBots "1" // Test clients will be replaced by connecting players when the server is full.
|
||||
set sv_voice "1" // Allow Voice Chat (0 = Disable. 1 = Enabled (Teams only).)
|
||||
set sv_voicequality "9" // Voice Chat Quality. (0-9) Default is 3 (= Steam/Console quality). Use 9 for the best quality.
|
||||
set sv_allowAimAssist "1" // Enable Controller Aim-Assist.
|
||||
set sv_allowColoredNames "1" // Allow Colors in Player Names.
|
||||
set sv_randomMapRotation "0" // Randomize map rotation (takes maps and gamemodes from sv_maprotation and randomizes them).
|
||||
set sv_disableChat "0" // Disable chat messages from clients.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// BASE GAME CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_player_forcerespawn "1" // Players respawn automatically after being fragged
|
||||
set scr_thirdperson "0" // third-person mode
|
||||
set scr_game_hardpoints "1" // Enable/Disable Killstreak rewards
|
||||
set scr_hardpoint_allowhelicopter "1" // Allow Attack Helicopters
|
||||
set scr_hardpoint_allowuav "1" // Allow UAV
|
||||
set scr_hardpoint_allowartillery "1" // Allow Airstrikes
|
||||
set scr_game_perks "1" // Allow players to have perks
|
||||
set scr_game_allowkillcam "1" // Allow Killcam.
|
||||
set scr_nukeTimer "10" // Timer when nuke goes off
|
||||
set scr_diehard "0" // die-hard mode. Teammates will have to revive each other.
|
||||
set scr_teambalance "1" // Enable or Disable auto balance.
|
||||
set scr_game_spectatetype "2" // Allow Spectators. 0 Disabled, 1 Team/Player only, 2 Free
|
||||
set scr_player_suicidespawndelay "0" // Wait before you respawn if you committed suicide.
|
||||
set scr_player_sprinttime "4" // Sprint time, duration a player can run.
|
||||
set scr_game_killstreakdelay "8" // Delay your killstreaks
|
||||
set scr_game_objectiveStreaks "1" // Enable Chopper, AC130 and Nuke
|
||||
set scr_classic "0" // Enable old-school COD4 killstreaks. UAV, Air Strike, Heli Only.
|
||||
set bg_elevators "1" // Elevator Glitch Settings (default: 1 (normal). 0 = off, 2 = easy).
|
||||
set bg_rocketJump "0" // Enable CoD4 Rocket Jumps.
|
||||
set bg_rocketJumpScale "64" // The scale applied to the pushback force of a rocket.
|
||||
set bg_climbAnything "0" // Treat any surface as a ladder.
|
||||
set bg_bounces "0" // Enable Bounces (default: 0 (disabled). 1 = enabled, 2 = double).
|
||||
set bg_bouncesAllAngles "0" // Enable Bounces from all angles (default: 0 (disabled). 1 = simple, 2 = all surfaces).
|
||||
set bg_disableLandingSlowdown "0" // Toggle landing slowdown.
|
||||
set bg_bunnyHopAuto "0" // Constantly jump when holding space.
|
||||
set bg_playerCollision "1" // Push intersecting players away from each other.
|
||||
set bg_playerEjection "1" // Push intersecting players away from each other.
|
||||
set bg_surfacePenetration "0" // Values greater than 0 override the surface penetration depth (ability to hit players through obstacles).
|
||||
set bg_bulletRange "8192" // Maximum Range used when calculating the bullet end position.
|
||||
set bg_lean "1" // Enable CoD4 leaning.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// XP BOOST CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for XP config //
|
||||
// by removing the // before each set dvar. //
|
||||
// Change "war" gametype to your liking. //
|
||||
// //
|
||||
// DO NOT ABUSE! Some people like to rank. //
|
||||
// DON'T BE A DICK! Warn HIGH XP via hostname. //
|
||||
// Don't know what you doing? Don't touch it! //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
//set scr_xpscale "2" // IW's way of Double XP.
|
||||
|
||||
//set scr_war_score_kill "0" // Amount of XP by each kill.
|
||||
//set scr_war_score_headshot "0" // Amount of XP by each headshot.
|
||||
//set scr_war_score_death "0" // Amount of XP by each death.
|
||||
//set scr_war_score_suicide "0" // Amount of XP by each suicide.
|
||||
//set scr_war_score_assist "0" // Amount of XP by each assist.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// AIRDROP CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for airdrop config //
|
||||
// by removing the // before each set dvar. //
|
||||
// //
|
||||
// Weight (1->1000) //
|
||||
// Selection is weighted random //
|
||||
// higher weights increase selection chance //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set scr_airdrop_ac130 "3"
|
||||
// set scr_airdrop_ammo "17"
|
||||
// set scr_airdrop_counter_uav "15"
|
||||
// set scr_airdrop_emp "1"
|
||||
// set scr_airdrop_harrier_airstrike "7"
|
||||
// set scr_airdrop_helicopter "7"
|
||||
// set scr_airdrop_helicopter_flares "5"
|
||||
// set scr_airdrop_helicopter_minigun "3"
|
||||
// set scr_airdrop_nuke "0"
|
||||
// set scr_airdrop_precision_airstrike "11"
|
||||
// set scr_airdrop_predator_missile "12"
|
||||
// set scr_airdrop_sentry "12"
|
||||
// set scr_airdrop_stealth_airstrike "5"
|
||||
// set scr_airdrop_uav "17"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// EMERGENCY AIRDROP CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for airdrop config //
|
||||
// by removing the // before each set dvar. //
|
||||
// //
|
||||
// Weight (1->1000) //
|
||||
// Selection is weighted random //
|
||||
// higher weights increase selection chance //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set scr_airdrop_mega_ac130 "2"
|
||||
// set scr_airdrop_mega_ammo "12"
|
||||
// set scr_airdrop_mega_counter_uav "16"
|
||||
// set scr_airdrop_mega_emp "0"
|
||||
// set scr_airdrop_mega_harrier_airstrike "5"
|
||||
// set scr_airdrop_mega_helicopter "5"
|
||||
// set scr_airdrop_mega_helicopter_flares "3"
|
||||
// set scr_airdrop_mega_helicopter_minigun "2"
|
||||
// set scr_airdrop_mega_nuke "0"
|
||||
// set scr_airdrop_mega_precision_airstrike "10"
|
||||
// set scr_airdrop_mega_predator_missile "14"
|
||||
// set scr_airdrop_mega_sentry "16"
|
||||
// set scr_airdrop_mega_stealth_airstrike "3"
|
||||
// set scr_airdrop_mega_uav "12"
|
||||
|
||||
//left alone. in case this missed your bat file. to view more game settings and map rotates check out your playlist.info file or use the right config for a cod4 style server.
|
||||
set party_enable 1
|
189
cfg/DedicatedConfigsLinux/userraw/partyserverlan.cfg
Normal file
189
cfg/DedicatedConfigsLinux/userraw/partyserverlan.cfg
Normal file
@ -0,0 +1,189 @@
|
||||
///////////////////////////////////////////////////
|
||||
/// IW4x Server Configuration file //
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
// SERVER NAME & COLORS TIPS //
|
||||
///////////////////////////////////////////////////
|
||||
// //
|
||||
// ^1 Red //
|
||||
// ^2 Green //
|
||||
// ^3 yellow //
|
||||
// ^4 Blue //
|
||||
// ^5 Cyan //
|
||||
// ^6 Pink //
|
||||
// ^7 White //
|
||||
// ^8 Depends on the team colors playing. //
|
||||
// ^9 grey //
|
||||
// ^0 Black //
|
||||
// ^: Rainbow colors //
|
||||
// //
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
|
||||
set sv_hostname "^2IW4x^7 LAN Lobby" // Sets the server hostname
|
||||
set sv_motd "" // Sets a custom motd which is shown on the intel message loadscreen when a player joins. leave blank for defualt intel messages.
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// ADMIN INFO (Optional) //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set _Admin "" // Your username.
|
||||
set _Email "" // E-mail address. you can leave blank
|
||||
set _Website "" // Website
|
||||
set _Location "Earth" // Location
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Web Server Downloading (Optional) //
|
||||
//////////////////////////////////////////////////
|
||||
//set sv_wwwDownload "1" // Allow downloading maps and mods from different server instead of the game server.
|
||||
//set sv_wwwBaseUrl "http://127.0.0.1/IW4x/" // http-Redirect to usermaps & mods folder on a web server. https does NOT work!
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// NON-GAMEPLAY CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set dedicated 0 // True if this is a dedicated server. (0-2) Default is 0 (= listen server). 1 (= dedicated LAN server), 2 (= dedicated internet server).
|
||||
set rcon_password "" // Access to your server to change stuff remotely or ingame. empty disabled
|
||||
set rcon_timeout "100" // Minimum allowed interval between rcon messages per IP address
|
||||
set sv_securityLevel "23" // Configures the servers security level.
|
||||
set sv_customTextColor "" // custom color for ^;
|
||||
set g_password "" // Password Protected Server. Leave blank if you want players to join or set password if you want to keep public out.
|
||||
set g_inactivity "0" // Enable auto kick feature for idle/AFK players
|
||||
set g_inactivitySpectator "0" // Time in seconds before a spectator gets kicked
|
||||
set logfile "2" // Enable loging 1-2? enable. 0 disable. Leave it on if you plan on using B3 or IW4MAdmin.
|
||||
set g_logSync "1" // 1 always flush games_mp.log, 0 only flush on game end
|
||||
set g_log "logs/lobbyLAN_games_mp.log" // Gamelog filename. If you edit this..make sure you change B3.xml if you have bigbrotherbot. IW4MAdmin auto-detects however.
|
||||
set g_allowVote "0" // Enable voting on this server
|
||||
set sv_votesRequired "0" // Votes required for a vote to pass. Settings this to 0 will calculate the required votes based on the number of players (players / 2 + 1)
|
||||
set sv_allowClientConsole "1" // Enable or Disable players ability to access server commands
|
||||
set sv_maxclients "18" // Max players in your server.
|
||||
set party_maxplayers "18" // ^^Same as above for some weird reason^^^
|
||||
set sv_maxPing "0" // Maximum ping allowed during connection, any higher and players will get kicked. ( If you get 'server is for low ping players only' which happens to custom dlc, set this back to 0)
|
||||
set sv_timeout "20" // Timeout time period. You will timeout after (20) seconds when attempting to connect or if you are getting connection interruptions
|
||||
set sv_reconnectlimit "3" // How many times you can try to reconnect
|
||||
set com_logFilter "1" // Removes ~95% of unneeded lines from the log.
|
||||
set sv_pure "0" // verifying cilent files
|
||||
set sv_sayName "^7Console" // name server-side 'say' commands show up as
|
||||
set sv_floodProtect "0" // Chat Spam Protection
|
||||
set sv_kickBanTime "3600" // Kick Ban Duration. Time before player can re-join the server after getting kicked.
|
||||
set sv_randomBotNames "1" // Randomize the names.
|
||||
set sv_replaceBots "1" // Test clients will be replaced by connecting players when the server is full.
|
||||
set sv_voice "1" // Allow Voice Chat (0 = Disable. 1 = Enabled (Teams only).)
|
||||
set sv_voicequality "9" // Voice Chat Quality. (0-9) Default is 3 (= Steam/Console quality). Use 9 for the best quality.
|
||||
set sv_allowAimAssist "1" // Enable Controller Aim-Assist.
|
||||
set sv_allowColoredNames "1" // Allow Colors in Player Names.
|
||||
set sv_randomMapRotation "0" // Randomize map rotation (takes maps and gamemodes from sv_maprotation and randomizes them).
|
||||
set sv_disableChat "0" // Disable chat messages from clients.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// BASE GAME CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_player_forcerespawn "1" // Players respawn automatically after being fragged
|
||||
set scr_thirdperson "0" // third-person mode
|
||||
set scr_game_hardpoints "1" // Enable/Disable Killstreak rewards
|
||||
set scr_hardpoint_allowhelicopter "1" // Allow Attack Helicopters
|
||||
set scr_hardpoint_allowuav "1" // Allow UAV
|
||||
set scr_hardpoint_allowartillery "1" // Allow Airstrikes
|
||||
set scr_game_perks "1" // Allow players to have perks
|
||||
set scr_game_allowkillcam "1" // Allow Killcam.
|
||||
set scr_nukeTimer "10" // Timer when nuke goes off
|
||||
set scr_diehard "0" // die-hard mode. Teammates will have to revive each other.
|
||||
set scr_teambalance "1" // Enable or Disable auto balance.
|
||||
set scr_game_spectatetype "2" // Allow Spectators. 0 Disabled, 1 Team/Player only, 2 Free
|
||||
set scr_player_suicidespawndelay "0" // Wait before you respawn if you committed suicide.
|
||||
set scr_player_sprinttime "4" // Sprint time, duration a player can run.
|
||||
set scr_game_killstreakdelay "8" // Delay your killstreaks
|
||||
set scr_game_objectiveStreaks "1" // Enable Chopper, AC130 and Nuke
|
||||
set scr_classic "0" // Enable old-school COD4 killstreaks. UAV, Air Strike, Heli Only.
|
||||
set bg_elevators "1" // Elevator Glitch Settings (default: 1 (normal). 0 = off, 2 = easy).
|
||||
set bg_rocketJump "0" // Enable CoD4 Rocket Jumps.
|
||||
set bg_rocketJumpScale "64" // The scale applied to the pushback force of a rocket.
|
||||
set bg_climbAnything "0" // Treat any surface as a ladder.
|
||||
set bg_bounces "0" // Enable Bounces (default: 0 (disabled). 1 = enabled, 2 = double).
|
||||
set bg_bouncesAllAngles "0" // Enable Bounces from all angles (default: 0 (disabled). 1 = simple, 2 = all surfaces).
|
||||
set bg_disableLandingSlowdown "0" // Toggle landing slowdown.
|
||||
set bg_bunnyHopAuto "0" // Constantly jump when holding space.
|
||||
set bg_playerCollision "1" // Push intersecting players away from each other.
|
||||
set bg_playerEjection "1" // Push intersecting players away from each other.
|
||||
set bg_surfacePenetration "0" // Values greater than 0 override the surface penetration depth (ability to hit players through obstacles).
|
||||
set bg_bulletRange "8192" // Maximum Range used when calculating the bullet end position.
|
||||
set bg_lean "1" // Enable CoD4 leaning.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// XP BOOST CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for XP config //
|
||||
// by removing the // before each set dvar. //
|
||||
// Change "war" gametype to your liking. //
|
||||
// //
|
||||
// DO NOT ABUSE! Some people like to rank. //
|
||||
// DON'T BE A DICK! Warn HIGH XP via hostname. //
|
||||
// Don't know what you doing? Don't touch it! //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
//set scr_xpscale "2" // IW's way of Double XP.
|
||||
|
||||
//set scr_war_score_kill "0" // Amount of XP by each kill.
|
||||
//set scr_war_score_headshot "0" // Amount of XP by each headshot.
|
||||
//set scr_war_score_death "0" // Amount of XP by each death.
|
||||
//set scr_war_score_suicide "0" // Amount of XP by each suicide.
|
||||
//set scr_war_score_assist "0" // Amount of XP by each assist.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// AIRDROP CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for airdrop config //
|
||||
// by removing the // before each set dvar. //
|
||||
// //
|
||||
// Weight (1->1000) //
|
||||
// Selection is weighted random //
|
||||
// higher weights increase selection chance //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set scr_airdrop_ac130 "3"
|
||||
// set scr_airdrop_ammo "17"
|
||||
// set scr_airdrop_counter_uav "15"
|
||||
// set scr_airdrop_emp "1"
|
||||
// set scr_airdrop_harrier_airstrike "7"
|
||||
// set scr_airdrop_helicopter "7"
|
||||
// set scr_airdrop_helicopter_flares "5"
|
||||
// set scr_airdrop_helicopter_minigun "3"
|
||||
// set scr_airdrop_nuke "0"
|
||||
// set scr_airdrop_precision_airstrike "11"
|
||||
// set scr_airdrop_predator_missile "12"
|
||||
// set scr_airdrop_sentry "12"
|
||||
// set scr_airdrop_stealth_airstrike "5"
|
||||
// set scr_airdrop_uav "17"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// EMERGENCY AIRDROP CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for airdrop config //
|
||||
// by removing the // before each set dvar. //
|
||||
// //
|
||||
// Weight (1->1000) //
|
||||
// Selection is weighted random //
|
||||
// higher weights increase selection chance //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set scr_airdrop_mega_ac130 "2"
|
||||
// set scr_airdrop_mega_ammo "12"
|
||||
// set scr_airdrop_mega_counter_uav "16"
|
||||
// set scr_airdrop_mega_emp "0"
|
||||
// set scr_airdrop_mega_harrier_airstrike "5"
|
||||
// set scr_airdrop_mega_helicopter "5"
|
||||
// set scr_airdrop_mega_helicopter_flares "3"
|
||||
// set scr_airdrop_mega_helicopter_minigun "2"
|
||||
// set scr_airdrop_mega_nuke "0"
|
||||
// set scr_airdrop_mega_precision_airstrike "10"
|
||||
// set scr_airdrop_mega_predator_missile "14"
|
||||
// set scr_airdrop_mega_sentry "16"
|
||||
// set scr_airdrop_mega_stealth_airstrike "3"
|
||||
// set scr_airdrop_mega_uav "12"
|
||||
|
||||
//left alone. in case this missed your bat file. to view more game settings and map rotates check out your playlist.info file or use the right config for a cod4 style server.
|
||||
set party_enable 1
|
582
cfg/DedicatedConfigsLinux/userraw/server.cfg
Normal file
582
cfg/DedicatedConfigsLinux/userraw/server.cfg
Normal file
@ -0,0 +1,582 @@
|
||||
///////////////////////////////////////////////////
|
||||
/// IW4x Server Configuration file //
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
// SERVER NAME & COLORS TIPS //
|
||||
///////////////////////////////////////////////////
|
||||
// //
|
||||
// ^1 Red //
|
||||
// ^2 Green //
|
||||
// ^3 yellow //
|
||||
// ^4 Blue //
|
||||
// ^5 Cyan //
|
||||
// ^6 Pink //
|
||||
// ^7 White //
|
||||
// ^8 Depends on the team colors playing. //
|
||||
// ^9 grey //
|
||||
// ^0 Black //
|
||||
// ^: Rainbow colors //
|
||||
// //
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
|
||||
set sv_hostname "^2IW4x^7 Default Server" // Sets the server hostname
|
||||
set sv_motd "" // Sets a custom motd which is shown on the intel message loadscreen when a player joins. leave blank for defualt intel messages.
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// ADMIN INFO (Optional) //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set _Admin "" // Your username.
|
||||
set _Email "" // E-mail address. you can leave blank
|
||||
set _Website "" // Website
|
||||
set _Location "Earth" // Location
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Web Server Downloading (Optional) //
|
||||
//////////////////////////////////////////////////
|
||||
//set sv_wwwDownload "1" // Allow downloading maps and mods from different server instead of the game server.
|
||||
//set sv_wwwBaseUrl "http://" // http-Redirect to usermaps & mods folder on a web server. https does NOT work!
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// NON-GAMEPLAY CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set dedicated 2 // True if this is a dedicated server. (0-2) Default is 0 (= listen server). 1 (= dedicated LAN server), 2 (= dedicated internet server).
|
||||
set rcon_password "" // Access to your server to change stuff remotely or ingame. empty disabled
|
||||
set rcon_timeout "100" // Minimum allowed interval between rcon messages per IP address
|
||||
set sv_securityLevel "23" // Configures the servers security level.
|
||||
set sv_customTextColor "" // custom color for ^;
|
||||
set g_password "" // Password Protected Server. Leave blank if you want players to join or set password if you want to keep public out.
|
||||
set g_inactivity "300" // Enable auto kick feature for idle/AFK players
|
||||
set g_inactivitySpectator "500" // Time in seconds before a spectator gets kicked
|
||||
set logfile "2" // Enable loging 1-2? enable. 0 disable. Leave it on if you plan on using B3 or IW4MAdmin.
|
||||
set g_logSync "1" // 1 always flush games_mp.log, 0 only flush on game end. Recommended to stay on for b3 and IW4MAdmin
|
||||
set g_log "logs/games_mp.log" // Gamelog filename. If you edit this, Make sure you change B3.xml if you have bigbrotherbot. IW4MAdmin auto-detects however.
|
||||
set g_allowVote "0" // Enable voting on this server
|
||||
set sv_votesRequired "0" // Votes required for a vote to pass. Settings this to 0 will calculate the required votes based on the number of players (players / 2 + 1)
|
||||
set sv_allowClientConsole "1" // Enable or Disable players ability to access server commands
|
||||
set sv_maxclients "18" // Max players in your server.
|
||||
set party_maxplayers "18" // ^^Same as above for some weird reason^^^
|
||||
set sv_maxPing "0" // Maximum ping allowed during connection, any higher and players will get kicked. ( If you get 'server is for low ping players only' which happens to custom dlc, set this back to 0)
|
||||
set sv_timeout "20" // Timeout time period. You will timeout after (20) seconds when attempting to connect or if you are getting connection interruptions
|
||||
set sv_reconnectlimit "4" // How many times you can try to reconnect
|
||||
set com_logFilter "1" // Removes ~95% of unneeded lines from the log.
|
||||
set sv_pure "0" // verifying cilent files
|
||||
set sv_sayName "^7Console" // name server-side 'say' commands show up as
|
||||
set sv_floodProtect "1" // Chat Spam Protection
|
||||
set sv_kickBanTime "3600" // Kick Ban Duration. Time before player can re-join the server after getting kicked.
|
||||
set sv_randomBotNames "1" // Randomize the names.
|
||||
set sv_replaceBots "1" // Test clients will be replaced by connecting players when the server is full.
|
||||
set set party_enable "0" // Lobby Mode Server. Read the wiki more about this. If you want sv_maprotation & control your gametype settings. Leave this at 0.
|
||||
set sv_voice "1" // Allow Voice Chat (0 = Disable. 1 = Enabled (Teams only).)
|
||||
set sv_voicequality "9" // Voice Chat Quality. (0-9) Default is 3 (= Steam/Console quality). Use 9 for the best quality.
|
||||
set sv_allowAimAssist "1" // Enable Controller Aim-Assist.
|
||||
set sv_allowColoredNames "1" // Allow Colors in Player Names.
|
||||
set sv_randomMapRotation "0" // Randomize map rotation (takes maps and gamemodes from sv_maprotation and randomizes them).
|
||||
set sv_disableChat "0" // Disable chat messages from clients.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// BASE GAME CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// //
|
||||
// war - Team Deathmatch //
|
||||
// dm - Free-for-all //
|
||||
// dom - Domination //
|
||||
// koth - Headquarters //
|
||||
// sab - Sabotage //
|
||||
// sd - Search and Destroy //
|
||||
// arena - Arena //
|
||||
// dd - Demolition //
|
||||
// ctf - Capture the Flag //
|
||||
// oneflag - One-Flag CTF //
|
||||
// gtnw - Global Thermo-Nuclear War //
|
||||
// //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set g_gametype "war" // Default gametype in case map rotation doesn't have any gametypes. Choose a gametype from the list above.
|
||||
set scr_player_forcerespawn "1" // Players respawn automatically after being fragged
|
||||
set scr_thirdperson "0" // third-person mode
|
||||
set scr_game_hardpoints "1" // Enable/Disable Killstreak rewards
|
||||
set scr_hardpoint_allowhelicopter "1" // Allow Attack Helicopters
|
||||
set scr_hardpoint_allowuav "1" // Allow UAV
|
||||
set scr_hardpoint_allowartillery "1" // Allow Airstrikes
|
||||
set scr_game_perks "1" // Allow players to have perks
|
||||
set scr_game_allowkillcam "1" // Allow Killcam.
|
||||
set scr_nukeTimer "10" // Timer when nuke goes off
|
||||
set scr_diehard "0" // die-hard mode. Teammates will have to revive each other.
|
||||
set scr_teambalance "1" // Enable or Disable auto balance.
|
||||
set scr_game_spectatetype "2" // Allow Spectators. 0 Disabled, 1 Team/Player only, 2 Free
|
||||
set scr_player_suicidespawndelay "0" // Wait before you respawn if you committed suicide.
|
||||
set scr_player_sprinttime "4" // Sprint time, duration a player can run.
|
||||
set scr_game_killstreakdelay "8" // Delay your killstreaks
|
||||
set scr_game_objectiveStreaks "1" // Enable Chopper, AC130 and Nuke
|
||||
set scr_classic "0" // Enable old-school COD4 killstreaks. UAV, Air Strike, Heli Only.
|
||||
set bg_elevators "1" // Elevator Glitch Settings (default: 1 (normal). 0 = off, 2 = easy).
|
||||
set bg_rocketJump "0" // Enable CoD4 Rocket Jumps.
|
||||
set bg_rocketJumpScale "64" // The scale applied to the pushback force of a rocket.
|
||||
set bg_climbAnything "0" // Treat any surface as a ladder.
|
||||
set bg_bounces "0" // Enable Bounces (default: 0 (disabled). 1 = enabled, 2 = double).
|
||||
set bg_bouncesAllAngles "0" // Enable Bounces from all angles (default: 0 (disabled). 1 = simple, 2 = all surfaces).
|
||||
set bg_disableLandingSlowdown "0" // Toggle landing slowdown.
|
||||
set bg_bunnyHopAuto "0" // Constantly jump when holding space.
|
||||
set bg_playerCollision "1" // Push intersecting players away from each other.
|
||||
set bg_playerEjection "1" // Push intersecting players away from each other.
|
||||
set bg_surfacePenetration "0" // Values greater than 0 override the surface penetration depth (ability to hit players through obstacles).
|
||||
set bg_bulletRange "8192" // Maximum Range used when calculating the bullet end position.
|
||||
set bg_lean "1" // Enable CoD4 leaning.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// XP BOOST CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for XP config //
|
||||
// by removing the // before each set dvar. //
|
||||
// Change "war" gametype to your liking. //
|
||||
// //
|
||||
// DO NOT ABUSE! Some people like to rank. //
|
||||
// DON'T BE A DICK! Warn HIGH XP via hostname. //
|
||||
// Don't know what you doing? Don't touch it! //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
//set scr_xpscale "2" // IW's way of Double XP.
|
||||
|
||||
//set scr_war_score_kill "0" // Amount of XP by each kill.
|
||||
//set scr_war_score_headshot "0" // Amount of XP by each headshot.
|
||||
//set scr_war_score_death "0" // Amount of XP by each death.
|
||||
//set scr_war_score_suicide "0" // Amount of XP by each suicide.
|
||||
//set scr_war_score_assist "0" // Amount of XP by each assist.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// HARDCORE CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for some hardcore //
|
||||
// by removing the // before each set dvar. //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set g_hardcore "1" // Enable hardcore mode
|
||||
// set scr_hardcore "1" // Enable hardcore mode again...
|
||||
// set ui_hud_hardcore "1" // Removes heads up display in hardcore mode.
|
||||
// set scr_game_deathpointloss "0" // Points Loss on death XP.
|
||||
// set scr_game_onlyheadshots "0" // Enable/Disable Only Headshots mode. You can only kill players by taking headshots.
|
||||
// set scr_player_maxhealth "30" // Percent of Health players will have on Respawn. (100 is normal. 30 is hardcore)
|
||||
// set scr_team_fftype "1" // Enable or Disable Friendly Fire. (1 on, 2 reflect, 3 shared)
|
||||
// set scr_player_healthregentime "0" // Time it takes you to recover damage. (5 is normal, 0 is hardcore)
|
||||
// set scr_team_kickteamkillers "5" // Anyone who team kills, gets kicked automatically if you enable this feature.
|
||||
// set scr_team_teamkillspawndelay "20" // Team Killer gets a respawn penalty of specified seconds (20).
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// AIRDROP CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for airdrop config //
|
||||
// by removing the // before each set dvar. //
|
||||
// //
|
||||
// Weight (1->1000) //
|
||||
// Selection is weighted random //
|
||||
// higher weights increase selection chance //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set scr_airdrop_ac130 "3"
|
||||
// set scr_airdrop_ammo "17"
|
||||
// set scr_airdrop_counter_uav "15"
|
||||
// set scr_airdrop_emp "1"
|
||||
// set scr_airdrop_harrier_airstrike "7"
|
||||
// set scr_airdrop_helicopter "7"
|
||||
// set scr_airdrop_helicopter_flares "5"
|
||||
// set scr_airdrop_helicopter_minigun "3"
|
||||
// set scr_airdrop_nuke "0"
|
||||
// set scr_airdrop_precision_airstrike "11"
|
||||
// set scr_airdrop_predator_missile "12"
|
||||
// set scr_airdrop_sentry "12"
|
||||
// set scr_airdrop_stealth_airstrike "5"
|
||||
// set scr_airdrop_uav "17"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// EMERGENCY AIRDROP CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for airdrop config //
|
||||
// by removing the // before each set dvar. //
|
||||
// //
|
||||
// Weight (1->1000) //
|
||||
// Selection is weighted random //
|
||||
// higher weights increase selection chance //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set scr_airdrop_mega_ac130 "2"
|
||||
// set scr_airdrop_mega_ammo "12"
|
||||
// set scr_airdrop_mega_counter_uav "16"
|
||||
// set scr_airdrop_mega_emp "0"
|
||||
// set scr_airdrop_mega_harrier_airstrike "5"
|
||||
// set scr_airdrop_mega_helicopter "5"
|
||||
// set scr_airdrop_mega_helicopter_flares "3"
|
||||
// set scr_airdrop_mega_helicopter_minigun "2"
|
||||
// set scr_airdrop_mega_nuke "0"
|
||||
// set scr_airdrop_mega_precision_airstrike "10"
|
||||
// set scr_airdrop_mega_predator_missile "14"
|
||||
// set scr_airdrop_mega_sentry "16"
|
||||
// set scr_airdrop_mega_stealth_airstrike "3"
|
||||
// set scr_airdrop_mega_uav "12"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// FREE FOR ALL GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_dm_scorelimit "1500" // Score limit to win the game.
|
||||
set scr_dm_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_dm_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_dm_numlives "0" // Number of lives per player. 0 for unlimited.
|
||||
set scr_dm_roundlimit "1" // Rounds per game.
|
||||
set scr_dm_winlimit "1" // amount of wins needed to win a round-based game
|
||||
set scr_dm_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// TEAM DEATHMATCH GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_war_scorelimit "7500" // Score limit to win the game.
|
||||
set scr_war_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_war_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_war_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||
set scr_war_numlives "0" // Number of lives per player 0 for unlimited.
|
||||
set scr_war_roundlimit "1" // Rounds per game.
|
||||
set scr_war_winlimit "1" // amount of wins needed to win a round-based game
|
||||
set scr_war_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// DOMINATION GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_dom_scorelimit "200" // Score limit to win the game.
|
||||
set scr_dom_timelimit "0" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_dom_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_dom_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||
set scr_dom_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
||||
set scr_dom_roundlimit "1" // Rounds per game
|
||||
set scr_dom_winlimit "1" // amount of wins needed to win a round-based game
|
||||
set scr_dom_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// DEMOLITION GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_dd_scorelimit "1" // Score limit needed to win.
|
||||
set scr_dd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_dd_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_dd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||
set scr_dd_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
||||
set scr_dd_roundswitch "1" // Rounds before the teams switch the sides.
|
||||
set scr_dd_bombtimer "45" // Time the bomb takes to detonate.
|
||||
set scr_dd_defusetime "5" // Time taken to defuse the bomb.
|
||||
set scr_dd_planttime "5" // Time it takes to plant a bomb in seconds.
|
||||
set scr_dd_roundlimit "3" // Rounds the game is limited to, if there are no winners.
|
||||
set scr_dd_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// SEARCH AND DESTROY GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_sd_scorelimit "1" // Score limit required to win the game.
|
||||
set scr_sd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_sd_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_sd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||
set scr_sd_numlives "1" // Number of lives per player per game.
|
||||
set scr_sd_roundlimit "0" // Rounds the game is limited to 0 for unlimited.
|
||||
set scr_sd_winlimit "4" // amount of wins needed to win a round-based game.
|
||||
set scr_sd_roundswitch "3" // after X rounds, switch sides.
|
||||
set scr_sd_bombtimer "45" // Time taken for the bomb to detonate.
|
||||
set scr_sd_defusetime "5" // Time taken to defuse the bomb.
|
||||
set scr_sd_multibomb "0" // allow multiple people to 'have the bomb'.
|
||||
set scr_sd_planttime "5" // How long will it take player to 'plant the bomb'.
|
||||
set scr_sd_promode "0"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// SABOTAGE GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_sab_scorelimit "0" // Score limit to win the match.
|
||||
set scr_sab_timelimit "20" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_sab_bombtimer "30" // Duration in seconds the bomb takes to detonate.
|
||||
set scr_sab_defusetime "5" // Time taken to defuse the bomb.
|
||||
set scr_sab_hotpotato "0" // One bomb that the teams must fight over. One defending and one have to plant at the site.
|
||||
set scr_sab_numlives "0" // Number of lives per player per game.
|
||||
set scr_sab_planttime "2.5" // Time taken to plant the bomb.
|
||||
set scr_sab_playerrespawndelay "7.5 // Time before respawn.
|
||||
set scr_sab_roundlimit "1" // Rounds per game.
|
||||
set scr_sab_roundswitch "1" // Rounds needed to be played before the teams switch sides.
|
||||
set scr_sab_waverespawndelay "0" // Time delay for first respawn before the game.
|
||||
set scr_sab_promode "0"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// CAPTURE THE FLAG GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_ctf_scorelimit "0" // Target score before the round ends.
|
||||
set scr_ctf_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_ctf_numlives "0" // Number of lives per player 0 for unlimited.
|
||||
set scr_ctf_halftime "1" // Half-Time
|
||||
set scr_ctf_roundlimit "1" // How many rounds match would last.
|
||||
set scr_ctf_returntime "30" // How many seconds before flag returns to base without nobody touching it.
|
||||
set scr_ctf_playerrespawndelay "0" // Respawn wait in seconds.
|
||||
set scr_ctf_waverespawndelay "10" // Time delay for first respawn before the game.
|
||||
set scr_ctf_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// ONE FLAG GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_oneflag_scorelimit "1" // Target score before the round ends.
|
||||
set scr_oneflag_timelimit "3" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_oneflag_numlives "0" // number of lives per player 0 for unlimited.
|
||||
set scr_oneflag_playerrespawndelay "0" // Respawn wait in seconds.
|
||||
set scr_oneflag_roundlimit "1" // How many rounds match would last.
|
||||
set scr_oneflag_roundswitch "1" // Rounds before the teams switch sides.
|
||||
set scr_oneflag_waverespawndelay "0" // First respawn delay for each round.
|
||||
set scr_oneflag_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// HEADQUARTERS GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_koth_scorelimit "250" // Score limit to win the game.
|
||||
set scr_koth_timelimit "15" // Duration in minutes the game will continue if the score isn't reached.
|
||||
set scr_koth_numlives "0" // Number of lives per game. 0 for unlimited.
|
||||
set scr_koth_playerrespawndelay "0" // Players respawn wait.
|
||||
set scr_koth_roundlimit "1" // Rounds to be played.
|
||||
set scr_koth_roundswitch "1" // Rounds to be played before teams switch sides.
|
||||
set scr_koth_winlimit "1" // rounds per game
|
||||
set scr_koth_waverespawndelay "0" // First respawn delay for each round.
|
||||
set scr_koth_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// ARENA GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_arena_scorelimit "1" // Score limit to win the game.
|
||||
set scr_arena_timelimit "2.5" // Duration in minutes the game will continue if the score isn't reached.
|
||||
set scr_arena_numlives "1" // Number of lives per game 0 for unlimited.
|
||||
set scr_arena_roundlimit "0" // Rounds to be played.
|
||||
set scr_arena_roundswitch "3" // Rounds before the teams switch sides.
|
||||
set scr_arena_winlimit "4" // rounds per game
|
||||
set scr_arena_promode "0"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// GLOBAL THERMONUCLEAR WAR GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_gtnw_scorelimit "101" // Score limit to win the game.
|
||||
set scr_gtnw_timelimit "10" // Duration in minutes the game will continue if the score isn't reached.
|
||||
set scr_gtnw_numlives "0" // Number of lives per game 0 for unlimited.
|
||||
set scr_gtnw_playerrespawndelay "0" // Players respawn wait.
|
||||
set scr_gtnw_roundlimit "1" // Rounds to be played.
|
||||
set scr_gtnw_roundswitch "0" // Rounds before the teams switch sides.
|
||||
set scr_gtnw_winlimit "1" // rounds per game
|
||||
set scr_gtnw_waverespawndelay "0" // First respawn delay for each round.
|
||||
set scr_gtnw_promode "0"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// MAP SHORT NAMES ROTATION LIST //
|
||||
//////////////////////////////////////////////////
|
||||
// //
|
||||
// mp_afghan - Afghan //
|
||||
// mp_derail - Derail //
|
||||
// mp_estate - Estate //
|
||||
// mp_favela - Favela //
|
||||
// mp_highrise - Highrise //
|
||||
// mp_invasion - Invasion //
|
||||
// mp_checkpoint - Karachi //
|
||||
// mp_quarry - Quarry //
|
||||
// mp_rundown - Rundown //
|
||||
// mp_rust - Rust //
|
||||
// mp_boneyard - Scrapyard //
|
||||
// mp_nightshift - Skidrow //
|
||||
// mp_subbase - Sub Base //
|
||||
// mp_terminal - Terminal //
|
||||
// mp_underpass - Underpass //
|
||||
// mp_brecourt - Wasteland //
|
||||
// //
|
||||
//// DLC1 STIMULUS ///////////////////////////////
|
||||
// //
|
||||
// mp_complex - Bailout //
|
||||
// mp_crash - Crash //
|
||||
// mp_overgrown - Overgrown //
|
||||
// mp_compact - Salvage //
|
||||
// mp_storm - Storm //
|
||||
// //
|
||||
//// DLC2 RESURGENCE /////////////////////////////
|
||||
// //
|
||||
// mp_abandon - Carnival //
|
||||
// mp_fuel2 - Fuel //
|
||||
// mp_strike - Strike //
|
||||
// mp_trailerpark - Trailer Park //
|
||||
// mp_vacant - Vacant //
|
||||
// //
|
||||
//// DLC3 NUKETOWN ///////////////////////////////
|
||||
// //
|
||||
// mp_nuked - Nuketown //
|
||||
// //
|
||||
/// DLC4 CLASSICS 1 //////////////////////////////
|
||||
// //
|
||||
// mp_cross_fire - Crossfire //
|
||||
// mp_bloc - Bloc //
|
||||
// mp_cargoship - Cargoship //
|
||||
// //
|
||||
/// DLC5 CLASSICS 2 //////////////////////////////
|
||||
// //
|
||||
// mp_killhouse - Killhouse //
|
||||
// mp_bog_sh - Bog //
|
||||
// //
|
||||
/// DLC6 FREIGHTER ///////////////////////////////
|
||||
// //
|
||||
// mp_cargoship_sh - Freighter //
|
||||
// //
|
||||
/// DLC7 RESURRECTION ////////////////////////////
|
||||
// //
|
||||
// mp_shipment - Shipment //
|
||||
// mp_shipment_long - Long:Shipment //
|
||||
// mp_rust_long - Long: Rust //
|
||||
// mp_firingrange - Firing Range //
|
||||
// //
|
||||
/// DLC8 RECYCLED ////////////////////////////////
|
||||
// //
|
||||
// mp_storm_spring - Chemical Plant //
|
||||
// mp_fav_tropical - Tropical: Favela //
|
||||
// mp_estate_tropical - Tropical: Estate //
|
||||
// mp_crash_tropical - Tropical: Crash //
|
||||
// mp_bloc_sh - Forgotten City //
|
||||
// //
|
||||
/// DLC9 CLASSICS 3 //////////////////////////////
|
||||
// //
|
||||
// mp_backlot - Backlot //
|
||||
// mp_broadcast - Broadcast //
|
||||
// mp_carentan - Chinatown //
|
||||
// mp_citystreets - District //
|
||||
// mp_convoy - Ambush //
|
||||
// mp_countdown - Countdown //
|
||||
// mp_crash_snow - Winter Crash //
|
||||
// mp_farm - Downpour //
|
||||
// mp_pipeline - Pipeline //
|
||||
// mp_showdown - Showdown //
|
||||
// //
|
||||
/// DLC10 MW3 ////////////////////////////////////
|
||||
// //
|
||||
// mp_dome - Dome //
|
||||
// mp_hardhat - Hardhat //
|
||||
// mp_paris - Resistance //
|
||||
// mp_seatown - Seatown //
|
||||
// mp_bravo - Mission //
|
||||
// mp_underground - Underground //
|
||||
// mp_plaza2 - Arkaden //
|
||||
// mp_village - Village //
|
||||
// mp_alpha - Lockdown //
|
||||
// //
|
||||
/// SP MAPS to MP ////////////////////////////////
|
||||
// //
|
||||
// oilrig - Oilrig //
|
||||
// iw4_credits - Test map //
|
||||
// co_hunted - Village //
|
||||
// //
|
||||
// Example: //
|
||||
// sv_maprotation "map mp_rust map mp_nuked" //
|
||||
// //
|
||||
// Example 24/7 Map: //
|
||||
// sv_maprotation "map mp_highrise" //
|
||||
// //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// GAMETYPE ROTATION LIST (OPTIONAL) //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// List of gametypes you can use on sv_maprotation to mix gametypes. //
|
||||
// or skip this if you plan on hosting 1 gametype only server. //
|
||||
// //
|
||||
// war - Team Deathmatch //
|
||||
// dm - Free-for-all //
|
||||
// dom - Domination //
|
||||
// koth - Headquarters //
|
||||
// sab - Sabotage //
|
||||
// sd - Search and Destroy //
|
||||
// arena - Arena //
|
||||
// dd - Demolition //
|
||||
// ctf - Capture the Flag //
|
||||
// oneflag - One-Flag CTF //
|
||||
// gtnw - Global Thermo-Nuclear War //
|
||||
// //
|
||||
// Example for mix gametype & map rotation: //
|
||||
// sv_maprotation "gametype dm map mp_rust gametype sd map mp_crash" //
|
||||
// //
|
||||
// You can add additional maps to the certain gametype until it reach //
|
||||
// the next gametype command. //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
addGametype war
|
||||
addMap mp_abandon
|
||||
addMap mp_afghan
|
||||
addMap mp_alpha
|
||||
addMap mp_backlot
|
||||
addMap mp_bloc
|
||||
addMap mp_bloc_sh
|
||||
addMap mp_bog_sh
|
||||
addMap mp_boneyard
|
||||
addMap mp_bravo
|
||||
addMap mp_brecourt
|
||||
addMap mp_broadcast
|
||||
addMap mp_carentan
|
||||
addMap mp_cargoship
|
||||
addMap mp_cargoship_sh
|
||||
addMap mp_checkpoint
|
||||
addMap mp_citystreets
|
||||
addMap mp_compact
|
||||
addMap mp_complex
|
||||
addMap mp_convoy
|
||||
addMap mp_countdown
|
||||
addMap mp_crash
|
||||
addMap mp_crash_snow
|
||||
addMap mp_crash_tropical
|
||||
addMap mp_cross_fire
|
||||
addMap mp_derail
|
||||
addMap mp_dome
|
||||
addMap mp_estate
|
||||
addMap mp_estate_tropical
|
||||
addMap mp_farm
|
||||
addMap mp_fav_tropical
|
||||
addMap mp_favela
|
||||
addMap mp_firingrange
|
||||
addMap mp_fuel2
|
||||
addMap mp_hardhat
|
||||
addMap mp_highrise
|
||||
addMap mp_invasion
|
||||
addMap mp_killhouse
|
||||
addMap mp_nightshift
|
||||
addMap mp_nuked
|
||||
addMap mp_overgrown
|
||||
addMap mp_paris
|
||||
addMap mp_pipeline
|
||||
addMap mp_plaza2
|
||||
addMap mp_quarry
|
||||
addMap mp_rundown
|
||||
addMap mp_rust
|
||||
addMap mp_rust_long
|
||||
addMap mp_seatown
|
||||
addMap mp_shipment
|
||||
addMap mp_shipment_long
|
||||
addMap mp_showdown
|
||||
addMap mp_storm
|
||||
addMap mp_storm_spring
|
||||
addMap mp_strike
|
||||
addMap mp_subbase
|
||||
addMap mp_terminal
|
||||
addMap mp_trailerpark
|
||||
addMap mp_underground
|
||||
addMap mp_underpass
|
||||
addMap mp_vacant
|
||||
addMap mp_village
|
582
cfg/DedicatedConfigsLinux/userraw/serverlan.cfg
Normal file
582
cfg/DedicatedConfigsLinux/userraw/serverlan.cfg
Normal file
@ -0,0 +1,582 @@
|
||||
///////////////////////////////////////////////////
|
||||
/// IW4x Server Configuration file //
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
// SERVER NAME & COLORS TIPS //
|
||||
///////////////////////////////////////////////////
|
||||
// //
|
||||
// ^1 Red //
|
||||
// ^2 Green //
|
||||
// ^3 yellow //
|
||||
// ^4 Blue //
|
||||
// ^5 Cyan //
|
||||
// ^6 Pink //
|
||||
// ^7 White //
|
||||
// ^8 Depends on the team colors playing. //
|
||||
// ^9 grey //
|
||||
// ^0 Black //
|
||||
// ^: Rainbow colors //
|
||||
// //
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
|
||||
set sv_hostname "^2IW4x^7 LAN Server" // Sets the server hostname
|
||||
set sv_motd "" // Sets a custom motd which is shown on the intel message loadscreen when a player joins. leave blank for defualt intel messages.
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// ADMIN INFO (Optional) //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set _Admin "" // Your username.
|
||||
set _Email "" // E-mail address. you can leave blank
|
||||
set _Website "" // Website
|
||||
set _Location "Earth" // Location
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Web Server Downloading (Optional) //
|
||||
//////////////////////////////////////////////////
|
||||
//set sv_wwwDownload "1" // Allow downloading maps and mods from different server instead of the game server.
|
||||
//set sv_wwwBaseUrl "http://127.0.0.1/IW4x/" // http-Redirect to usermaps & mods folder on a web server. https does NOT work!
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// NON-GAMEPLAY CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set dedicated 1 // True if this is a dedicated server. (0-2) Default is 0 (= listen server). 1 (= dedicated LAN server), 2 (= dedicated internet server).
|
||||
set rcon_password "" // Access to your server to change stuff remotely or ingame. empty disabled
|
||||
set rcon_timeout "100" // Minimum allowed interval between rcon messages per IP address
|
||||
set sv_securityLevel "23" // Configures the servers security level.
|
||||
set sv_customTextColor "" // custom color for ^;
|
||||
set g_password "" // Password Protected Server. Leave blank if you want players to join or set password if you want to keep public out.
|
||||
set g_inactivity "0" // Enable auto kick feature for idle/AFK players
|
||||
set g_inactivitySpectator "0" // Time in seconds before a spectator gets kicked
|
||||
set logfile "2" // Enable loging 1-2? enable. 0 disable. Leave it on if you plan on using B3 or IW4MAdmin.
|
||||
set g_logSync "1" // 1 always flush games_mp.log, 0 only flush on game end
|
||||
set g_log "logs/localgame_mp.log" // Gamelog filename.
|
||||
set g_allowVote "0" // Enable voting on this server
|
||||
set sv_votesRequired "0" // Votes required for a vote to pass. Settings this to 0 will calculate the required votes based on the number of players (players / 2 + 1)
|
||||
set sv_allowClientConsole "1" // Enable or Disable players ability to access server commands
|
||||
set sv_maxclients "18" // Max players in your server.
|
||||
set party_maxplayers "18" // ^^Same as above for some weird reason^^^
|
||||
set sv_maxPing "0" // Maximum ping allowed during connection, any higher and players will get kicked. ( If you get 'server is for low ping players only' which happens to custom dlc, set this back to 0)
|
||||
set sv_timeout "20" // Timeout time period. You will timeout after (20) seconds when attempting to connect or if you are getting connection interruptions
|
||||
set sv_reconnectlimit "3" // How many times you can try to reconnect
|
||||
set com_logFilter "1" // Removes ~95% of unneeded lines from the log.
|
||||
set sv_pure "0" // verifying cilent files
|
||||
set sv_sayName "^7Console" // name server-side 'say' commands show up as
|
||||
set sv_floodProtect "0" // Chat Spam Protection
|
||||
set sv_kickBanTime "3600" // Kick Ban Duration. Time before player can re-join the server after getting kicked.
|
||||
set sv_randomBotNames "1" // Randomize the names.
|
||||
set sv_replaceBots "1" // Test clients will be replaced by connecting players when the server is full.
|
||||
set set party_enable "0" // Lobby Mode Server. Read the wiki more about this. If you want sv_maprotation & control your gametype settings. Leave this at 0.
|
||||
set sv_voice "1" // Allow Voice Chat (0 = Disable. 1 = Enabled (Teams only).)
|
||||
set sv_voicequality "9" // Voice Chat Quality. (0-9) Default is 3 (= Steam/Console quality). Use 9 for the best quality.
|
||||
set sv_allowAimAssist "1" // Enable Controller Aim-Assist.
|
||||
set sv_allowColoredNames "1" // Allow Colors in Player Names.
|
||||
set sv_randomMapRotation "0" // Randomize map rotation (takes maps and gamemodes from sv_maprotation and randomizes them).
|
||||
set sv_disableChat "0" // Disable chat messages from clients.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// BASE GAME CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// //
|
||||
// war - Team Deathmatch //
|
||||
// dm - Free-for-all //
|
||||
// dom - Domination //
|
||||
// koth - Headquarters //
|
||||
// sab - Sabotage //
|
||||
// sd - Search and Destroy //
|
||||
// arena - Arena //
|
||||
// dd - Demolition //
|
||||
// ctf - Capture the Flag //
|
||||
// oneflag - One-Flag CTF //
|
||||
// gtnw - Global Thermo-Nuclear War //
|
||||
// //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set g_gametype "war" // Default gametype in case map rotation doesn't have any gametypes. Choose a gametype from the list above.
|
||||
set scr_player_forcerespawn "1" // Players respawn automatically after being fragged
|
||||
set scr_thirdperson "0" // third-person mode
|
||||
set scr_game_hardpoints "1" // Enable/Disable Killstreak rewards
|
||||
set scr_hardpoint_allowhelicopter "1" // Allow Attack Helicopters
|
||||
set scr_hardpoint_allowuav "1" // Allow UAV
|
||||
set scr_hardpoint_allowartillery "1" // Allow Airstrikes
|
||||
set scr_game_perks "1" // Allow players to have perks
|
||||
set scr_game_allowkillcam "1" // Allow Killcam.
|
||||
set scr_nukeTimer "10" // Timer when nuke goes off
|
||||
set scr_diehard "0" // die-hard mode. Teammates will have to revive each other.
|
||||
set scr_teambalance "1" // Enable or Disable auto balance.
|
||||
set scr_game_spectatetype "2" // Allow Spectators. 0 Disabled, 1 Team/Player only, 2 Free
|
||||
set scr_player_suicidespawndelay "0" // Wait before you respawn if you committed suicide.
|
||||
set scr_player_sprinttime "4" // Sprint time, duration a player can run.
|
||||
set scr_game_killstreakdelay "8" // Delay your killstreaks
|
||||
set scr_game_objectiveStreaks "1" // Enable Chopper, AC130 and Nuke
|
||||
set scr_classic "0" // Enable old-school COD4 killstreaks. UAV, Air Strike, Heli Only.
|
||||
set bg_elevators "1" // Elevator Glitch Settings (default: 1 (normal). 0 = off, 2 = easy).
|
||||
set bg_rocketJump "0" // Enable CoD4 Rocket Jumps.
|
||||
set bg_rocketJumpScale "64" // The scale applied to the pushback force of a rocket.
|
||||
set bg_climbAnything "0" // Treat any surface as a ladder.
|
||||
set bg_bounces "0" // Enable Bounces (default: 0 (disabled). 1 = enabled, 2 = double).
|
||||
set bg_bouncesAllAngles "0" // Enable Bounces from all angles (default: 0 (disabled). 1 = simple, 2 = all surfaces).
|
||||
set bg_disableLandingSlowdown "0" // Toggle landing slowdown.
|
||||
set bg_bunnyHopAuto "0" // Constantly jump when holding space.
|
||||
set bg_playerCollision "1" // Push intersecting players away from each other.
|
||||
set bg_playerEjection "1" // Push intersecting players away from each other.
|
||||
set bg_surfacePenetration "0" // Values greater than 0 override the surface penetration depth (ability to hit players through obstacles).
|
||||
set bg_bulletRange "8192" // Maximum Range used when calculating the bullet end position.
|
||||
set bg_lean "1" // Enable CoD4 leaning.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// XP BOOST CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for XP config //
|
||||
// by removing the // before each set dvar. //
|
||||
// Change "war" gametype to your liking. //
|
||||
// //
|
||||
// DO NOT ABUSE! Some people like to rank. //
|
||||
// DON'T BE A DICK! Warn HIGH XP via hostname. //
|
||||
// Don't know what you doing? Don't touch it! //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
//set scr_xpscale "2" // IW's way of Double XP.
|
||||
|
||||
//set scr_war_score_kill "0" // Amount of XP by each kill.
|
||||
//set scr_war_score_headshot "0" // Amount of XP by each headshot.
|
||||
//set scr_war_score_death "0" // Amount of XP by each death.
|
||||
//set scr_war_score_suicide "0" // Amount of XP by each suicide.
|
||||
//set scr_war_score_assist "0" // Amount of XP by each assist.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// HARDCORE CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for some hardcore //
|
||||
// by removing the // before each set dvar. //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set g_hardcore "1" // Enable hardcore mode
|
||||
// set scr_hardcore "1" // Enable hardcore mode again...
|
||||
// set ui_hud_hardcore "1" // Removes heads up display in hardcore mode.
|
||||
// set scr_game_deathpointloss "0" // Points Loss on death XP.
|
||||
// set scr_game_onlyheadshots "0" // Enable/Disable Only Headshots mode. You can only kill players by taking headshots.
|
||||
// set scr_player_maxhealth "30" // Percent of Health players will have on Respawn. (100 is normal. 30 is hardcore)
|
||||
// set scr_team_fftype "1" // Enable or Disable Friendly Fire. (1 on, 2 reflect, 3 shared)
|
||||
// set scr_player_healthregentime "0" // Time it takes you to recover damage. (5 is normal, 0 is hardcore)
|
||||
// set scr_team_kickteamkillers "5" // Anyone who team kills, gets kicked automatically if you enable this feature.
|
||||
// set scr_team_teamkillspawndelay "20" // Team Killer gets a respawn penalty of specified seconds (20).
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// AIRDROP CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for airdrop config //
|
||||
// by removing the // before each set dvar. //
|
||||
// //
|
||||
// Weight (1->1000) //
|
||||
// Selection is weighted random //
|
||||
// higher weights increase selection chance //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set scr_airdrop_ac130 "3"
|
||||
// set scr_airdrop_ammo "17"
|
||||
// set scr_airdrop_counter_uav "15"
|
||||
// set scr_airdrop_emp "1"
|
||||
// set scr_airdrop_harrier_airstrike "7"
|
||||
// set scr_airdrop_helicopter "7"
|
||||
// set scr_airdrop_helicopter_flares "5"
|
||||
// set scr_airdrop_helicopter_minigun "3"
|
||||
// set scr_airdrop_nuke "0"
|
||||
// set scr_airdrop_precision_airstrike "11"
|
||||
// set scr_airdrop_predator_missile "12"
|
||||
// set scr_airdrop_sentry "12"
|
||||
// set scr_airdrop_stealth_airstrike "5"
|
||||
// set scr_airdrop_uav "17"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// EMERGENCY AIRDROP CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for airdrop config //
|
||||
// by removing the // before each set dvar. //
|
||||
// //
|
||||
// Weight (1->1000) //
|
||||
// Selection is weighted random //
|
||||
// higher weights increase selection chance //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set scr_airdrop_mega_ac130 "2"
|
||||
// set scr_airdrop_mega_ammo "12"
|
||||
// set scr_airdrop_mega_counter_uav "16"
|
||||
// set scr_airdrop_mega_emp "0"
|
||||
// set scr_airdrop_mega_harrier_airstrike "5"
|
||||
// set scr_airdrop_mega_helicopter "5"
|
||||
// set scr_airdrop_mega_helicopter_flares "3"
|
||||
// set scr_airdrop_mega_helicopter_minigun "2"
|
||||
// set scr_airdrop_mega_nuke "0"
|
||||
// set scr_airdrop_mega_precision_airstrike "10"
|
||||
// set scr_airdrop_mega_predator_missile "14"
|
||||
// set scr_airdrop_mega_sentry "16"
|
||||
// set scr_airdrop_mega_stealth_airstrike "3"
|
||||
// set scr_airdrop_mega_uav "12"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// FREE FOR ALL GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_dm_scorelimit "1500" // Score limit to win the game.
|
||||
set scr_dm_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_dm_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_dm_numlives "0" // Number of lives per player. 0 for unlimited.
|
||||
set scr_dm_roundlimit "1" // Rounds per game.
|
||||
set scr_dm_winlimit "1" // amount of wins needed to win a round-based game
|
||||
set scr_dm_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// TEAM DEATHMATCH GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_war_scorelimit "7500" // Score limit to win the game.
|
||||
set scr_war_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_war_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_war_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||
set scr_war_numlives "0" // Number of lives per player 0 for unlimited.
|
||||
set scr_war_roundlimit "1" // Rounds per game.
|
||||
set scr_war_winlimit "1" // amount of wins needed to win a round-based game
|
||||
set scr_war_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// DOMINATION GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_dom_scorelimit "200" // Score limit to win the game.
|
||||
set scr_dom_timelimit "0" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_dom_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_dom_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||
set scr_dom_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
||||
set scr_dom_roundlimit "1" // Rounds per game
|
||||
set scr_dom_winlimit "1" // amount of wins needed to win a round-based game
|
||||
set scr_dom_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// DEMOLITION GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_dd_scorelimit "1" // Score limit needed to win.
|
||||
set scr_dd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_dd_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_dd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||
set scr_dd_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
||||
set scr_dd_roundswitch "1" // Rounds before the teams switch the sides.
|
||||
set scr_dd_bombtimer "45" // Time the bomb takes to detonate.
|
||||
set scr_dd_defusetime "5" // Time taken to defuse the bomb.
|
||||
set scr_dd_planttime "5" // Time it takes to plant a bomb in seconds.
|
||||
set scr_dd_roundlimit "3" // Rounds the game is limited to, if there are no winners.
|
||||
set scr_dd_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// SEARCH AND DESTROY GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_sd_scorelimit "1" // Score limit required to win the game.
|
||||
set scr_sd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_sd_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_sd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||
set scr_sd_numlives "1" // Number of lives per player per game.
|
||||
set scr_sd_roundlimit "0" // Rounds the game is limited to 0 for unlimited.
|
||||
set scr_sd_winlimit "4" // amount of wins needed to win a round-based game.
|
||||
set scr_sd_roundswitch "3" // after X rounds, switch sides.
|
||||
set scr_sd_bombtimer "45" // Time taken for the bomb to detonate.
|
||||
set scr_sd_defusetime "5" // Time taken to defuse the bomb.
|
||||
set scr_sd_multibomb "0" // allow multiple people to 'have the bomb'.
|
||||
set scr_sd_planttime "5" // How long will it take player to 'plant the bomb'.
|
||||
set scr_sd_promode "0"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// SABOTAGE GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_sab_scorelimit "0" // Score limit to win the match.
|
||||
set scr_sab_timelimit "20" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_sab_bombtimer "30" // Duration in seconds the bomb takes to detonate.
|
||||
set scr_sab_defusetime "5" // Time taken to defuse the bomb.
|
||||
set scr_sab_hotpotato "0" // One bomb that the teams must fight over. One defending and one have to plant at the site.
|
||||
set scr_sab_numlives "0" // Number of lives per player per game.
|
||||
set scr_sab_planttime "2.5" // Time taken to plant the bomb.
|
||||
set scr_sab_playerrespawndelay "7.5 // Time before respawn.
|
||||
set scr_sab_roundlimit "1" // Rounds per game.
|
||||
set scr_sab_roundswitch "1" // Rounds needed to be played before the teams switch sides.
|
||||
set scr_sab_waverespawndelay "0" // Time delay for first respawn before the game.
|
||||
set scr_sab_promode "0"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// CAPTURE THE FLAG GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_ctf_scorelimit "0" // Target score before the round ends.
|
||||
set scr_ctf_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_ctf_numlives "0" // Number of lives per player 0 for unlimited.
|
||||
set scr_ctf_halftime "1" // Half-Time
|
||||
set scr_ctf_roundlimit "1" // How many rounds match would last.
|
||||
set scr_ctf_returntime "30" // How many seconds before flag returns to base without nobody touching it.
|
||||
set scr_ctf_playerrespawndelay "0" // Respawn wait in seconds.
|
||||
set scr_ctf_waverespawndelay "10" // Time delay for first respawn before the game.
|
||||
set scr_ctf_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// ONE FLAG GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_oneflag_scorelimit "1" // Target score before the round ends.
|
||||
set scr_oneflag_timelimit "3" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_oneflag_numlives "0" // number of lives per player 0 for unlimited.
|
||||
set scr_oneflag_playerrespawndelay "0" // Respawn wait in seconds.
|
||||
set scr_oneflag_roundlimit "1" // How many rounds match would last.
|
||||
set scr_oneflag_roundswitch "1" // Rounds before the teams switch sides.
|
||||
set scr_oneflag_waverespawndelay "0" // First respawn delay for each round.
|
||||
set scr_oneflag_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// HEADQUARTERS GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_koth_scorelimit "250" // Score limit to win the game.
|
||||
set scr_koth_timelimit "15" // Duration in minutes the game will continue if the score isn't reached.
|
||||
set scr_koth_numlives "0" // Number of lives per game. 0 for unlimited.
|
||||
set scr_koth_playerrespawndelay "0" // Players respawn wait.
|
||||
set scr_koth_roundlimit "1" // Rounds to be played.
|
||||
set scr_koth_roundswitch "1" // Rounds to be played before teams switch sides.
|
||||
set scr_koth_winlimit "1" // rounds per game
|
||||
set scr_koth_waverespawndelay "0" // First respawn delay for each round.
|
||||
set scr_koth_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// ARENA GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_arena_scorelimit "1" // Score limit to win the game.
|
||||
set scr_arena_timelimit "2.5" // Duration in minutes the game will continue if the score isn't reached.
|
||||
set scr_arena_numlives "1" // Number of lives per game 0 for unlimited.
|
||||
set scr_arena_roundlimit "0" // Rounds to be played.
|
||||
set scr_arena_roundswitch "3" // Rounds before the teams switch sides.
|
||||
set scr_arena_winlimit "4" // rounds per game
|
||||
set scr_arena_promode "0"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// GLOBAL THERMONUCLEAR WAR GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_gtnw_scorelimit "101" // Score limit to win the game.
|
||||
set scr_gtnw_timelimit "10" // Duration in minutes the game will continue if the score isn't reached.
|
||||
set scr_gtnw_numlives "0" // Number of lives per game 0 for unlimited.
|
||||
set scr_gtnw_playerrespawndelay "0" // Players respawn wait.
|
||||
set scr_gtnw_roundlimit "1" // Rounds to be played.
|
||||
set scr_gtnw_roundswitch "0" // Rounds before the teams switch sides.
|
||||
set scr_gtnw_winlimit "1" // rounds per game
|
||||
set scr_gtnw_waverespawndelay "0" // First respawn delay for each round.
|
||||
set scr_gtnw_promode "0"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// MAP SHORT NAMES ROTATION LIST //
|
||||
//////////////////////////////////////////////////
|
||||
// //
|
||||
// mp_afghan - Afghan //
|
||||
// mp_derail - Derail //
|
||||
// mp_estate - Estate //
|
||||
// mp_favela - Favela //
|
||||
// mp_highrise - Highrise //
|
||||
// mp_invasion - Invasion //
|
||||
// mp_checkpoint - Karachi //
|
||||
// mp_quarry - Quarry //
|
||||
// mp_rundown - Rundown //
|
||||
// mp_rust - Rust //
|
||||
// mp_boneyard - Scrapyard //
|
||||
// mp_nightshift - Skidrow //
|
||||
// mp_subbase - Sub Base //
|
||||
// mp_terminal - Terminal //
|
||||
// mp_underpass - Underpass //
|
||||
// mp_brecourt - Wasteland //
|
||||
// //
|
||||
//// DLC1 STIMULUS ///////////////////////////////
|
||||
// //
|
||||
// mp_complex - Bailout //
|
||||
// mp_crash - Crash //
|
||||
// mp_overgrown - Overgrown //
|
||||
// mp_compact - Salvage //
|
||||
// mp_storm - Storm //
|
||||
// //
|
||||
//// DLC2 RESURGENCE /////////////////////////////
|
||||
// //
|
||||
// mp_abandon - Carnival //
|
||||
// mp_fuel2 - Fuel //
|
||||
// mp_strike - Strike //
|
||||
// mp_trailerpark - Trailer Park //
|
||||
// mp_vacant - Vacant //
|
||||
// //
|
||||
//// DLC3 NUKETOWN ///////////////////////////////
|
||||
// //
|
||||
// mp_nuked - Nuketown //
|
||||
// //
|
||||
/// DLC4 CLASSICS 1 //////////////////////////////
|
||||
// //
|
||||
// mp_cross_fire - Crossfire //
|
||||
// mp_bloc - Bloc //
|
||||
// mp_cargoship - Cargoship //
|
||||
// //
|
||||
/// DLC5 CLASSICS 2 //////////////////////////////
|
||||
// //
|
||||
// mp_killhouse - Killhouse //
|
||||
// mp_bog_sh - Bog //
|
||||
// //
|
||||
/// DLC6 FREIGHTER ///////////////////////////////
|
||||
// //
|
||||
// mp_cargoship_sh - Freighter //
|
||||
// //
|
||||
/// DLC7 RESURRECTION ////////////////////////////
|
||||
// //
|
||||
// mp_shipment - Shipment //
|
||||
// mp_shipment_long - Long:Shipment //
|
||||
// mp_rust_long - Long: Rust //
|
||||
// mp_firingrange - Firing Range //
|
||||
// //
|
||||
/// DLC8 RECYCLED ////////////////////////////////
|
||||
// //
|
||||
// mp_storm_spring - Chemical Plant //
|
||||
// mp_fav_tropical - Tropical: Favela //
|
||||
// mp_estate_tropical - Tropical: Estate //
|
||||
// mp_crash_tropical - Tropical: Crash //
|
||||
// mp_bloc_sh - Forgotten City //
|
||||
// //
|
||||
/// DLC9 CLASSICS 3 //////////////////////////////
|
||||
// //
|
||||
// mp_backlot - Backlot //
|
||||
// mp_broadcast - Broadcast //
|
||||
// mp_carentan - Chinatown //
|
||||
// mp_citystreets - District //
|
||||
// mp_convoy - Ambush //
|
||||
// mp_countdown - Countdown //
|
||||
// mp_crash_snow - Winter Crash //
|
||||
// mp_farm - Downpour //
|
||||
// mp_pipeline - Pipeline //
|
||||
// mp_showdown - Showdown //
|
||||
// //
|
||||
/// DLC10 MW3 ////////////////////////////////////
|
||||
// //
|
||||
// mp_dome - Dome //
|
||||
// mp_hardhat - Hardhat //
|
||||
// mp_paris - Resistance //
|
||||
// mp_seatown - Seatown //
|
||||
// mp_bravo - Mission //
|
||||
// mp_underground - Underground //
|
||||
// mp_plaza2 - Arkaden //
|
||||
// mp_village - Village //
|
||||
// mp_alpha - Lockdown //
|
||||
// //
|
||||
/// SP MAPS to MP ////////////////////////////////
|
||||
// //
|
||||
// oilrig - Oilrig //
|
||||
// iw4_credits - Test map //
|
||||
// co_hunted - Village //
|
||||
// //
|
||||
// Example: //
|
||||
// sv_maprotation "map mp_rust map mp_nuked" //
|
||||
// //
|
||||
// Example 24/7 Map: //
|
||||
// sv_maprotation "map mp_highrise" //
|
||||
// //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// GAMETYPE ROTATION LIST (OPTIONAL) //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// List of gametypes you can use on sv_maprotation to mix gametypes. //
|
||||
// or skip this if you plan on hosting 1 gametype only server. //
|
||||
// //
|
||||
// war - Team Deathmatch //
|
||||
// dm - Free-for-all //
|
||||
// dom - Domination //
|
||||
// koth - Headquarters //
|
||||
// sab - Sabotage //
|
||||
// sd - Search and Destroy //
|
||||
// arena - Arena //
|
||||
// dd - Demolition //
|
||||
// ctf - Capture the Flag //
|
||||
// oneflag - One-Flag CTF //
|
||||
// gtnw - Global Thermo-Nuclear War //
|
||||
// //
|
||||
// Example for mix gametype & map rotation: //
|
||||
// sv_maprotation "gametype dm map mp_rust gametype sd map mp_crash" //
|
||||
// //
|
||||
// You can add additional maps to the certain gametype until it reach //
|
||||
// the next gametype command. //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
addGametype war
|
||||
addMap mp_abandon
|
||||
addMap mp_afghan
|
||||
addMap mp_alpha
|
||||
addMap mp_backlot
|
||||
addMap mp_bloc
|
||||
addMap mp_bloc_sh
|
||||
addMap mp_bog_sh
|
||||
addMap mp_boneyard
|
||||
addMap mp_bravo
|
||||
addMap mp_brecourt
|
||||
addMap mp_broadcast
|
||||
addMap mp_carentan
|
||||
addMap mp_cargoship
|
||||
addMap mp_cargoship_sh
|
||||
addMap mp_checkpoint
|
||||
addMap mp_citystreets
|
||||
addMap mp_compact
|
||||
addMap mp_complex
|
||||
addMap mp_convoy
|
||||
addMap mp_countdown
|
||||
addMap mp_crash
|
||||
addMap mp_crash_snow
|
||||
addMap mp_crash_tropical
|
||||
addMap mp_cross_fire
|
||||
addMap mp_derail
|
||||
addMap mp_dome
|
||||
addMap mp_estate
|
||||
addMap mp_estate_tropical
|
||||
addMap mp_farm
|
||||
addMap mp_fav_tropical
|
||||
addMap mp_favela
|
||||
addMap mp_firingrange
|
||||
addMap mp_fuel2
|
||||
addMap mp_hardhat
|
||||
addMap mp_highrise
|
||||
addMap mp_invasion
|
||||
addMap mp_killhouse
|
||||
addMap mp_nightshift
|
||||
addMap mp_nuked
|
||||
addMap mp_overgrown
|
||||
addMap mp_paris
|
||||
addMap mp_pipeline
|
||||
addMap mp_plaza2
|
||||
addMap mp_quarry
|
||||
addMap mp_rundown
|
||||
addMap mp_rust
|
||||
addMap mp_rust_long
|
||||
addMap mp_seatown
|
||||
addMap mp_shipment
|
||||
addMap mp_shipment_long
|
||||
addMap mp_showdown
|
||||
addMap mp_storm
|
||||
addMap mp_storm_spring
|
||||
addMap mp_strike
|
||||
addMap mp_subbase
|
||||
addMap mp_terminal
|
||||
addMap mp_trailerpark
|
||||
addMap mp_underground
|
||||
addMap mp_underpass
|
||||
addMap mp_vacant
|
||||
addMap mp_village
|
102
cfg/DedicatedConfigsWindows/DedicatedLobbyServer.bat
Normal file
102
cfg/DedicatedConfigsWindows/DedicatedLobbyServer.bat
Normal file
@ -0,0 +1,102 @@
|
||||
@echo off
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::/// IW4x Lobby Server Configuration start-up file ///
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// For support visit us on discord https://discord.gg/2ETE8engZM //
|
||||
::// //
|
||||
::// Default Playlist Gamemode from myplaylists.info //
|
||||
::// (If you change that file around. consider this list useless..) //
|
||||
::// //
|
||||
::// 0 iw4x DLC (bonus edit) //
|
||||
::// 1 Team Deathmatch //
|
||||
::// 2 Hardcore Team Deathmatch //
|
||||
::// 3 Free-for-all //
|
||||
::// 4 Hardcore Free-for-all //
|
||||
::// 5 Domination //
|
||||
::// 6 Hardcore: Domination //
|
||||
::// 7 Search and Destory //
|
||||
::// 8 Hardcore: Search and Destory //
|
||||
::// 9 Demolition //
|
||||
::// 10 Hardcore: Demolition //
|
||||
::// 11 Capture the flag //
|
||||
::// 12 Hardcore: Capture the flag //
|
||||
::// 13 Headquarters //
|
||||
::// 14 Hardcore: Headquarters //
|
||||
::// 15 Sabotage //
|
||||
::// 16 Hardcore: Sabotage //
|
||||
::// 17 Ground War //
|
||||
::// 18 Hardcore: Ground War //
|
||||
::// //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Choose your gamemode of 0-22 of your choice above //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
set PlaylistGameMode=1
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Your Game Server Port. //
|
||||
::// Make sure you Port Forward both UDP & TCP //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
set GamePort=28960
|
||||
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Offline/Private LAN Party Mode //
|
||||
::// 0 Disable (Send heartbeats to online serverlist) //
|
||||
::// 1 Enable (Add to the Local serverlist. Unlisted from Public) //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
set LANMode=0
|
||||
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Enable logging. //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
set LogFile=1
|
||||
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Below edits are optional unless you run multiable servers or mods.//
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Load a mod on your server //
|
||||
::// Example: ModfolderName=mods/bots //
|
||||
::// //
|
||||
::// UNLOAD a mod on your server //
|
||||
::// Example: ModfolderName= //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
set ModFolderName=
|
||||
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Your edited Playlist in the "userraw" folder goes here (optional) //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
set PlaylistFilename=myplaylists.info
|
||||
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Your edited partyserver.cfg in the "userraw" folder goes here //
|
||||
::// This is were you edit your hostname, rcon, inactivity, etc //
|
||||
::// (Optional) //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
set ServerFilename=partyserver.cfg
|
||||
|
||||
:: Remove this line if automatic updates on start should be disabled
|
||||
start /W alterware-launcher.exe --update
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
:://DONE!! WARNING! Don't mess with anything below this line. SEROUSLY!//
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
start iw4x.exe -dedicated +set fs_game "%ModFolderName%" +set sv_lanonly "%LANMode%" +set net_port "%GamePort%" +exec %ServerFilename% +set logfile "%LogFile%" +set party_enable "1" +set playlistFilename "%PlaylistFilename%" +playlist "%playlistGameMode%"
|
102
cfg/DedicatedConfigsWindows/DedicatedLobbyServerLAN.bat
Normal file
102
cfg/DedicatedConfigsWindows/DedicatedLobbyServerLAN.bat
Normal file
@ -0,0 +1,102 @@
|
||||
@echo off
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::/// IW4x Lobby Server Configuration start-up file ///
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// For support visit us on discord https://discord.gg/2ETE8engZM //
|
||||
::// //
|
||||
::// Default Playlist Gamemode from myplaylists.info //
|
||||
::// (If you change that file around. consider this list useless..) //
|
||||
::// //
|
||||
::// 0 iw4x DLC (bonus edit) //
|
||||
::// 1 Team Deathmatch //
|
||||
::// 2 Hardcore Team Deathmatch //
|
||||
::// 3 Free-for-all //
|
||||
::// 4 Hardcore Free-for-all //
|
||||
::// 5 Domination //
|
||||
::// 6 Hardcore: Domination //
|
||||
::// 7 Search and Destory //
|
||||
::// 8 Hardcore: Search and Destory //
|
||||
::// 9 Demolition //
|
||||
::// 10 Hardcore: Demolition //
|
||||
::// 11 Capture the flag //
|
||||
::// 12 Hardcore: Capture the flag //
|
||||
::// 13 Headquarters //
|
||||
::// 14 Hardcore: Headquarters //
|
||||
::// 15 Sabotage //
|
||||
::// 16 Hardcore: Sabotage //
|
||||
::// 17 Ground War //
|
||||
::// 18 Hardcore: Ground War //
|
||||
::// //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Choose your gamemode of 0-22 of your choice above //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
set PlaylistGameMode=1
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Your Game Server Port. //
|
||||
::// Make sure you Port Forward both UDP & TCP //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
set GamePort=28960
|
||||
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Offline/Private LAN Party Mode //
|
||||
::// 0 Disable (Send heartbeats to online serverlist) //
|
||||
::// 1 Enable (Add to the Local serverlist. Unlisted from Public) //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
set LANMode=1
|
||||
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Enable logging. //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
set LogFile=1
|
||||
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Below edits are optional unless you run multiable servers or mods.//
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Load a mod on your server //
|
||||
::// Example: ModfolderName=mods/bots //
|
||||
::// //
|
||||
::// UNLOAD a mod on your server //
|
||||
::// Example: ModfolderName= //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
set ModFolderName=
|
||||
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Your edited Playlist in the "userraw" folder goes here (optional) //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
set PlaylistFilename=myplaylists.info
|
||||
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Your edited partyserver.cfg in the "userraw" folder goes here //
|
||||
::// This is were you edit your hostname, rcon, inactivity, etc //
|
||||
::// (Optional) //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
set ServerFilename=partyserverlan.cfg
|
||||
|
||||
:: Remove this line if automatic updates on start should be disabled
|
||||
start /W alterware-launcher.exe --update
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
:://DONE!! WARNING! Don't mess with anything below this line. SEROUSLY!//
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
start iw4x.exe -dedicated +set fs_game "%ModFolderName%" +set sv_lanonly "%LANMode%" +set net_port "%GamePort%" +exec %ServerFilename% +set logfile "%LogFile%" +set party_enable "1" +set playlistFilename "%PlaylistFilename%" +playlist "%playlistGameMode%"
|
61
cfg/DedicatedConfigsWindows/DedicatedServer.bat
Normal file
61
cfg/DedicatedConfigsWindows/DedicatedServer.bat
Normal file
@ -0,0 +1,61 @@
|
||||
@echo off
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::/// IW4x Dedicated Server Configuration start-up file ///
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// For support visit us on discord https://discord.gg/2ETE8engZM //
|
||||
::// //
|
||||
::// Your Game Server Port. //
|
||||
::// Make sure you Port Forward both UDP & TCP //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
set GamePort=28960
|
||||
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Offline/Private LAN Party Mode //
|
||||
::// 0 Disable (Send heartbeats to online serverlist) //
|
||||
::// 1 Enable (Add to the Local serverlist. Unlisted from Public) //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
set LANMode=0
|
||||
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Enable logging. //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
set LogFile=1
|
||||
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Below edits are optional unless you run multiable servers or mods.//
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Load a mod on your server //
|
||||
::// Example: ModfolderName=mods/bots //
|
||||
::// //
|
||||
::// UNLOAD a mod on your server //
|
||||
::// Example: ModfolderName= //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
set ModFolderName=
|
||||
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Your edited server.cfg in the "userraw" folder goes here... //
|
||||
::// This is were you edit your hostname, rcon, inactivity, etc //
|
||||
::// (Optional) //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
set ServerFilename=server.cfg
|
||||
|
||||
:: Remove this line if automatic updates on start should be disabled
|
||||
start /W alterware-launcher.exe --update
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
:://DONE!! WARNING! Don't mess with anything below this line. SEROUSLY!//
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
start iw4x.exe -dedicated +set fs_game "%ModFolderName%" +set sv_lanonly "%LANMode%" +set net_port "%GamePort%" +exec %ServerFilename% +set logfile "%LogFile%" +set party_enable "0" +map_rotate
|
63
cfg/DedicatedConfigsWindows/DedicatedServerLAN.bat
Normal file
63
cfg/DedicatedConfigsWindows/DedicatedServerLAN.bat
Normal file
@ -0,0 +1,63 @@
|
||||
@echo off
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::/// IW4x Dedicated Server Configuration start-up file ///
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// For support visit us on discord https://discord.gg/2ETE8engZM //
|
||||
::// //
|
||||
::// Your Game Server Port. //
|
||||
::// Make sure you Port Forward both UDP & TCP //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
set GamePort=28960
|
||||
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Offline/Private LAN Party Mode //
|
||||
::// 0 Disable (Send heartbeats to online serverlist) //
|
||||
::// 1 Enable (Add to the Local serverlist. Unlisted from Public) //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
set LANMode=1
|
||||
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Enable logging. //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
set LogFile=1
|
||||
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Below edits are optional unless you run multiable servers or mods.//
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Load a mod on your server //
|
||||
::// Example: ModfolderName=mods/bots //
|
||||
::// //
|
||||
::// UNLOAD a mod on your server //
|
||||
::// Example: ModfolderName= //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
set ModFolderName=
|
||||
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
::// Your edited server.cfg in the "userraw" folder goes here... //
|
||||
::// This is were you edit your hostname, rcon, inactivity, etc //
|
||||
::// (Optional) //
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
set ServerFilename=serverlan.cfg
|
||||
|
||||
:: Remove this line if automatic updates on start should be disabled
|
||||
start /W alterware-launcher.exe --update
|
||||
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
:://DONE!! WARNING! Don't mess with anything below this line. SEROUSLY!//
|
||||
::///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
start iw4x.exe -dedicated +set fs_game "%ModFolderName%" +set sv_lanonly "%LANMode%" +set net_port "%GamePort%" +exec %ServerFilename% +set logfile "%LogFile%" +set party_enable "0" +map_rotate
|
1938
cfg/DedicatedConfigsWindows/userraw/LANPlaylist.info
Normal file
1938
cfg/DedicatedConfigsWindows/userraw/LANPlaylist.info
Normal file
File diff suppressed because it is too large
Load Diff
1919
cfg/DedicatedConfigsWindows/userraw/myplaylists.info
Normal file
1919
cfg/DedicatedConfigsWindows/userraw/myplaylists.info
Normal file
File diff suppressed because it is too large
Load Diff
189
cfg/DedicatedConfigsWindows/userraw/partyserver.cfg
Normal file
189
cfg/DedicatedConfigsWindows/userraw/partyserver.cfg
Normal file
@ -0,0 +1,189 @@
|
||||
///////////////////////////////////////////////////
|
||||
/// IW4x Server Configuration file //
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
// SERVER NAME & COLORS TIPS //
|
||||
///////////////////////////////////////////////////
|
||||
// //
|
||||
// ^1 Red //
|
||||
// ^2 Green //
|
||||
// ^3 yellow //
|
||||
// ^4 Blue //
|
||||
// ^5 Cyan //
|
||||
// ^6 Pink //
|
||||
// ^7 White //
|
||||
// ^8 Depends on the team colors playing. //
|
||||
// ^9 grey //
|
||||
// ^0 Black //
|
||||
// ^: Rainbow colors //
|
||||
// //
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
|
||||
set sv_hostname "^2IW4x^7 Default Lobby Server" // Sets the server hostname
|
||||
set sv_motd "" // Sets a custom motd which is shown on the intel message loadscreen when a player joins. leave blank for defualt intel messages.
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// ADMIN INFO (Optional) //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set _Admin "" // Your username.
|
||||
set _Email "" // E-mail address. you can leave blank
|
||||
set _Website "" // Website
|
||||
set _Location "Earth" // Location
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Web Server Downloading (Optional) //
|
||||
//////////////////////////////////////////////////
|
||||
//set sv_wwwDownload "1" // Allow downloading maps and mods from different server instead of the game server.
|
||||
//set sv_wwwBaseUrl "http://" // http-Redirect to usermaps & mods folder on a web server. https does NOT work!
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// NON-GAMEPLAY CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set dedicated 0 // True if this is a dedicated server. (0-2) Default is 0 (= listen server). 1 (= dedicated LAN server), 2 (= dedicated internet server).
|
||||
set rcon_password "" // Access to your server to change stuff remotely or ingame. empty disabled
|
||||
set rcon_timeout "100" // Minimum allowed interval between rcon messages per IP address
|
||||
set sv_securityLevel "23" // Configures the servers security level.
|
||||
set sv_customTextColor "" // custom color for ^;
|
||||
set g_password "" // Password Protected Server. Leave blank if you want players to join or set password if you want to keep public out.
|
||||
set g_inactivity "380" // Enable auto kick feature for idle/AFK players
|
||||
set g_inactivitySpectator "500" // Time in seconds before a spectator gets kicked
|
||||
set logfile "2" // Enable loging 1-2? enable. 0 disable. Leave it on if you plan on using B3 or IW4MAdmin.
|
||||
set g_logSync "1" // 1 always flush games_mp.log, 0 only flush on game end
|
||||
set g_log "logs/lobby_games_mp.log" // Gamelog filename. If you edit this..make sure you change B3.xml if you have bigbrotherbot. IW4MAdmin auto-detects however.
|
||||
set g_allowVote "0" // Enable voting on this server
|
||||
set sv_votesRequired "0" // Votes required for a vote to pass. Settings this to 0 will calculate the required votes based on the number of players (players / 2 + 1)
|
||||
set sv_allowClientConsole "1" // Enable or Disable players ability to access server commands
|
||||
set sv_maxclients "18" // Max players in your server.
|
||||
set party_maxplayers "18" // ^^Same as above for some weird reason^^^
|
||||
set sv_maxPing "0" // Maximum ping allowed during connection, any higher and players will get kicked. ( If you get 'server is for low ping players only' which happens to custom dlc, set this back to 0)
|
||||
set sv_timeout "20" // Timeout time period. You will timeout after (20) seconds when attempting to connect or if you are getting connection interruptions
|
||||
set sv_reconnectlimit "3" // How many times you can try to reconnect
|
||||
set com_logFilter "1" // Removes ~95% of unneeded lines from the log.
|
||||
set sv_pure "0" // verifying cilent files
|
||||
set sv_sayName "^7Console" // name server-side 'say' commands show up as
|
||||
set sv_floodProtect "1" // Chat Spam Protection
|
||||
set sv_kickBanTime "3600" // Kick Ban Duration. Time before player can re-join the server after getting kicked.
|
||||
set sv_randomBotNames "1" // Randomize the names.
|
||||
set sv_replaceBots "1" // Test clients will be replaced by connecting players when the server is full.
|
||||
set sv_voice "1" // Allow Voice Chat (0 = Disable. 1 = Enabled (Teams only).)
|
||||
set sv_voicequality "9" // Voice Chat Quality. (0-9) Default is 3 (= Steam/Console quality). Use 9 for the best quality.
|
||||
set sv_allowAimAssist "1" // Enable Controller Aim-Assist.
|
||||
set sv_allowColoredNames "1" // Allow Colors in Player Names.
|
||||
set sv_randomMapRotation "0" // Randomize map rotation (takes maps and gamemodes from sv_maprotation and randomizes them).
|
||||
set sv_disableChat "0" // Disable chat messages from clients.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// BASE GAME CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_player_forcerespawn "1" // Players respawn automatically after being fragged
|
||||
set scr_thirdperson "0" // third-person mode
|
||||
set scr_game_hardpoints "1" // Enable/Disable Killstreak rewards
|
||||
set scr_hardpoint_allowhelicopter "1" // Allow Attack Helicopters
|
||||
set scr_hardpoint_allowuav "1" // Allow UAV
|
||||
set scr_hardpoint_allowartillery "1" // Allow Airstrikes
|
||||
set scr_game_perks "1" // Allow players to have perks
|
||||
set scr_game_allowkillcam "1" // Allow Killcam.
|
||||
set scr_nukeTimer "10" // Timer when nuke goes off
|
||||
set scr_diehard "0" // die-hard mode. Teammates will have to revive each other.
|
||||
set scr_teambalance "1" // Enable or Disable auto balance.
|
||||
set scr_game_spectatetype "2" // Allow Spectators. 0 Disabled, 1 Team/Player only, 2 Free
|
||||
set scr_player_suicidespawndelay "0" // Wait before you respawn if you committed suicide.
|
||||
set scr_player_sprinttime "4" // Sprint time, duration a player can run.
|
||||
set scr_game_killstreakdelay "8" // Delay your killstreaks
|
||||
set scr_game_objectiveStreaks "1" // Enable Chopper, AC130 and Nuke
|
||||
set scr_classic "0" // Enable old-school COD4 killstreaks. UAV, Air Strike, Heli Only.
|
||||
set bg_elevators "1" // Elevator Glitch Settings (default: 1 (normal). 0 = off, 2 = easy).
|
||||
set bg_rocketJump "0" // Enable CoD4 Rocket Jumps.
|
||||
set bg_rocketJumpScale "64" // The scale applied to the pushback force of a rocket.
|
||||
set bg_climbAnything "0" // Treat any surface as a ladder.
|
||||
set bg_bounces "0" // Enable Bounces (default: 0 (disabled). 1 = enabled, 2 = double).
|
||||
set bg_bouncesAllAngles "0" // Enable Bounces from all angles (default: 0 (disabled). 1 = simple, 2 = all surfaces).
|
||||
set bg_disableLandingSlowdown "0" // Toggle landing slowdown.
|
||||
set bg_bunnyHopAuto "0" // Constantly jump when holding space.
|
||||
set bg_playerCollision "1" // Push intersecting players away from each other.
|
||||
set bg_playerEjection "1" // Push intersecting players away from each other.
|
||||
set bg_surfacePenetration "0" // Values greater than 0 override the surface penetration depth (ability to hit players through obstacles).
|
||||
set bg_bulletRange "8192" // Maximum Range used when calculating the bullet end position.
|
||||
set bg_lean "1" // Enable CoD4 leaning.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// XP BOOST CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for XP config //
|
||||
// by removing the // before each set dvar. //
|
||||
// Change "war" gametype to your liking. //
|
||||
// //
|
||||
// DO NOT ABUSE! Some people like to rank. //
|
||||
// DON'T BE A DICK! Warn HIGH XP via hostname. //
|
||||
// Don't know what you doing? Don't touch it! //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
//set scr_xpscale "2" // IW's way of Double XP.
|
||||
|
||||
//set scr_war_score_kill "0" // Amount of XP by each kill.
|
||||
//set scr_war_score_headshot "0" // Amount of XP by each headshot.
|
||||
//set scr_war_score_death "0" // Amount of XP by each death.
|
||||
//set scr_war_score_suicide "0" // Amount of XP by each suicide.
|
||||
//set scr_war_score_assist "0" // Amount of XP by each assist.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// AIRDROP CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for airdrop config //
|
||||
// by removing the // before each set dvar. //
|
||||
// //
|
||||
// Weight (1->1000) //
|
||||
// Selection is weighted random //
|
||||
// higher weights increase selection chance //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set scr_airdrop_ac130 "3"
|
||||
// set scr_airdrop_ammo "17"
|
||||
// set scr_airdrop_counter_uav "15"
|
||||
// set scr_airdrop_emp "1"
|
||||
// set scr_airdrop_harrier_airstrike "7"
|
||||
// set scr_airdrop_helicopter "7"
|
||||
// set scr_airdrop_helicopter_flares "5"
|
||||
// set scr_airdrop_helicopter_minigun "3"
|
||||
// set scr_airdrop_nuke "0"
|
||||
// set scr_airdrop_precision_airstrike "11"
|
||||
// set scr_airdrop_predator_missile "12"
|
||||
// set scr_airdrop_sentry "12"
|
||||
// set scr_airdrop_stealth_airstrike "5"
|
||||
// set scr_airdrop_uav "17"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// EMERGENCY AIRDROP CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for airdrop config //
|
||||
// by removing the // before each set dvar. //
|
||||
// //
|
||||
// Weight (1->1000) //
|
||||
// Selection is weighted random //
|
||||
// higher weights increase selection chance //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set scr_airdrop_mega_ac130 "2"
|
||||
// set scr_airdrop_mega_ammo "12"
|
||||
// set scr_airdrop_mega_counter_uav "16"
|
||||
// set scr_airdrop_mega_emp "0"
|
||||
// set scr_airdrop_mega_harrier_airstrike "5"
|
||||
// set scr_airdrop_mega_helicopter "5"
|
||||
// set scr_airdrop_mega_helicopter_flares "3"
|
||||
// set scr_airdrop_mega_helicopter_minigun "2"
|
||||
// set scr_airdrop_mega_nuke "0"
|
||||
// set scr_airdrop_mega_precision_airstrike "10"
|
||||
// set scr_airdrop_mega_predator_missile "14"
|
||||
// set scr_airdrop_mega_sentry "16"
|
||||
// set scr_airdrop_mega_stealth_airstrike "3"
|
||||
// set scr_airdrop_mega_uav "12"
|
||||
|
||||
//left alone. in case this missed your bat file. to view more game settings and map rotates check out your playlist.info file or use the right config for a cod4 style server.
|
||||
set party_enable 1
|
189
cfg/DedicatedConfigsWindows/userraw/partyserverlan.cfg
Normal file
189
cfg/DedicatedConfigsWindows/userraw/partyserverlan.cfg
Normal file
@ -0,0 +1,189 @@
|
||||
///////////////////////////////////////////////////
|
||||
/// IW4x Server Configuration file //
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
// SERVER NAME & COLORS TIPS //
|
||||
///////////////////////////////////////////////////
|
||||
// //
|
||||
// ^1 Red //
|
||||
// ^2 Green //
|
||||
// ^3 yellow //
|
||||
// ^4 Blue //
|
||||
// ^5 Cyan //
|
||||
// ^6 Pink //
|
||||
// ^7 White //
|
||||
// ^8 Depends on the team colors playing. //
|
||||
// ^9 grey //
|
||||
// ^0 Black //
|
||||
// ^: Rainbow colors //
|
||||
// //
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
|
||||
set sv_hostname "^2IW4x^7 LAN Lobby" // Sets the server hostname
|
||||
set sv_motd "" // Sets a custom motd which is shown on the intel message loadscreen when a player joins. leave blank for defualt intel messages.
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// ADMIN INFO (Optional) //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set _Admin "" // Your username.
|
||||
set _Email "" // E-mail address. you can leave blank
|
||||
set _Website "" // Website
|
||||
set _Location "Earth" // Location
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Web Server Downloading (Optional) //
|
||||
//////////////////////////////////////////////////
|
||||
//set sv_wwwDownload "1" // Allow downloading maps and mods from different server instead of the game server.
|
||||
//set sv_wwwBaseUrl "http://127.0.0.1/IW4x/" // http-Redirect to usermaps & mods folder on a web server. https does NOT work!
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// NON-GAMEPLAY CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set dedicated 0 // True if this is a dedicated server. (0-2) Default is 0 (= listen server). 1 (= dedicated LAN server), 2 (= dedicated internet server).
|
||||
set rcon_password "" // Access to your server to change stuff remotely or ingame. empty disabled
|
||||
set rcon_timeout "100" // Minimum allowed interval between rcon messages per IP address
|
||||
set sv_securityLevel "23" // Configures the servers security level.
|
||||
set sv_customTextColor "" // custom color for ^;
|
||||
set g_password "" // Password Protected Server. Leave blank if you want players to join or set password if you want to keep public out.
|
||||
set g_inactivity "0" // Enable auto kick feature for idle/AFK players
|
||||
set g_inactivitySpectator "0" // Time in seconds before a spectator gets kicked
|
||||
set logfile "2" // Enable loging 1-2? enable. 0 disable. Leave it on if you plan on using B3 or IW4MAdmin.
|
||||
set g_logSync "1" // 1 always flush games_mp.log, 0 only flush on game end
|
||||
set g_log "logs/lobbyLAN_games_mp.log" // Gamelog filename. If you edit this..make sure you change B3.xml if you have bigbrotherbot. IW4MAdmin auto-detects however.
|
||||
set g_allowVote "0" // Enable voting on this server
|
||||
set sv_votesRequired "0" // Votes required for a vote to pass. Settings this to 0 will calculate the required votes based on the number of players (players / 2 + 1)
|
||||
set sv_allowClientConsole "1" // Enable or Disable players ability to access server commands
|
||||
set sv_maxclients "18" // Max players in your server.
|
||||
set party_maxplayers "18" // ^^Same as above for some weird reason^^^
|
||||
set sv_maxPing "0" // Maximum ping allowed during connection, any higher and players will get kicked. ( If you get 'server is for low ping players only' which happens to custom dlc, set this back to 0)
|
||||
set sv_timeout "20" // Timeout time period. You will timeout after (20) seconds when attempting to connect or if you are getting connection interruptions
|
||||
set sv_reconnectlimit "3" // How many times you can try to reconnect
|
||||
set com_logFilter "1" // Removes ~95% of unneeded lines from the log.
|
||||
set sv_pure "0" // verifying cilent files
|
||||
set sv_sayName "^7Console" // name server-side 'say' commands show up as
|
||||
set sv_floodProtect "0" // Chat Spam Protection
|
||||
set sv_kickBanTime "3600" // Kick Ban Duration. Time before player can re-join the server after getting kicked.
|
||||
set sv_randomBotNames "1" // Randomize the names.
|
||||
set sv_replaceBots "1" // Test clients will be replaced by connecting players when the server is full.
|
||||
set sv_voice "1" // Allow Voice Chat (0 = Disable. 1 = Enabled (Teams only).)
|
||||
set sv_voicequality "9" // Voice Chat Quality. (0-9) Default is 3 (= Steam/Console quality). Use 9 for the best quality.
|
||||
set sv_allowAimAssist "1" // Enable Controller Aim-Assist.
|
||||
set sv_allowColoredNames "1" // Allow Colors in Player Names.
|
||||
set sv_randomMapRotation "0" // Randomize map rotation (takes maps and gamemodes from sv_maprotation and randomizes them).
|
||||
set sv_disableChat "0" // Disable chat messages from clients.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// BASE GAME CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_player_forcerespawn "1" // Players respawn automatically after being fragged
|
||||
set scr_thirdperson "0" // third-person mode
|
||||
set scr_game_hardpoints "1" // Enable/Disable Killstreak rewards
|
||||
set scr_hardpoint_allowhelicopter "1" // Allow Attack Helicopters
|
||||
set scr_hardpoint_allowuav "1" // Allow UAV
|
||||
set scr_hardpoint_allowartillery "1" // Allow Airstrikes
|
||||
set scr_game_perks "1" // Allow players to have perks
|
||||
set scr_game_allowkillcam "1" // Allow Killcam.
|
||||
set scr_nukeTimer "10" // Timer when nuke goes off
|
||||
set scr_diehard "0" // die-hard mode. Teammates will have to revive each other.
|
||||
set scr_teambalance "1" // Enable or Disable auto balance.
|
||||
set scr_game_spectatetype "2" // Allow Spectators. 0 Disabled, 1 Team/Player only, 2 Free
|
||||
set scr_player_suicidespawndelay "0" // Wait before you respawn if you committed suicide.
|
||||
set scr_player_sprinttime "4" // Sprint time, duration a player can run.
|
||||
set scr_game_killstreakdelay "8" // Delay your killstreaks
|
||||
set scr_game_objectiveStreaks "1" // Enable Chopper, AC130 and Nuke
|
||||
set scr_classic "0" // Enable old-school COD4 killstreaks. UAV, Air Strike, Heli Only.
|
||||
set bg_elevators "1" // Elevator Glitch Settings (default: 1 (normal). 0 = off, 2 = easy).
|
||||
set bg_rocketJump "0" // Enable CoD4 Rocket Jumps.
|
||||
set bg_rocketJumpScale "64" // The scale applied to the pushback force of a rocket.
|
||||
set bg_climbAnything "0" // Treat any surface as a ladder.
|
||||
set bg_bounces "0" // Enable Bounces (default: 0 (disabled). 1 = enabled, 2 = double).
|
||||
set bg_bouncesAllAngles "0" // Enable Bounces from all angles (default: 0 (disabled). 1 = simple, 2 = all surfaces).
|
||||
set bg_disableLandingSlowdown "0" // Toggle landing slowdown.
|
||||
set bg_bunnyHopAuto "0" // Constantly jump when holding space.
|
||||
set bg_playerCollision "1" // Push intersecting players away from each other.
|
||||
set bg_playerEjection "1" // Push intersecting players away from each other.
|
||||
set bg_surfacePenetration "0" // Values greater than 0 override the surface penetration depth (ability to hit players through obstacles).
|
||||
set bg_bulletRange "8192" // Maximum Range used when calculating the bullet end position.
|
||||
set bg_lean "1" // Enable CoD4 leaning.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// XP BOOST CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for XP config //
|
||||
// by removing the // before each set dvar. //
|
||||
// Change "war" gametype to your liking. //
|
||||
// //
|
||||
// DO NOT ABUSE! Some people like to rank. //
|
||||
// DON'T BE A DICK! Warn HIGH XP via hostname. //
|
||||
// Don't know what you doing? Don't touch it! //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
//set scr_xpscale "2" // IW's way of Double XP.
|
||||
|
||||
//set scr_war_score_kill "0" // Amount of XP by each kill.
|
||||
//set scr_war_score_headshot "0" // Amount of XP by each headshot.
|
||||
//set scr_war_score_death "0" // Amount of XP by each death.
|
||||
//set scr_war_score_suicide "0" // Amount of XP by each suicide.
|
||||
//set scr_war_score_assist "0" // Amount of XP by each assist.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// AIRDROP CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for airdrop config //
|
||||
// by removing the // before each set dvar. //
|
||||
// //
|
||||
// Weight (1->1000) //
|
||||
// Selection is weighted random //
|
||||
// higher weights increase selection chance //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set scr_airdrop_ac130 "3"
|
||||
// set scr_airdrop_ammo "17"
|
||||
// set scr_airdrop_counter_uav "15"
|
||||
// set scr_airdrop_emp "1"
|
||||
// set scr_airdrop_harrier_airstrike "7"
|
||||
// set scr_airdrop_helicopter "7"
|
||||
// set scr_airdrop_helicopter_flares "5"
|
||||
// set scr_airdrop_helicopter_minigun "3"
|
||||
// set scr_airdrop_nuke "0"
|
||||
// set scr_airdrop_precision_airstrike "11"
|
||||
// set scr_airdrop_predator_missile "12"
|
||||
// set scr_airdrop_sentry "12"
|
||||
// set scr_airdrop_stealth_airstrike "5"
|
||||
// set scr_airdrop_uav "17"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// EMERGENCY AIRDROP CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for airdrop config //
|
||||
// by removing the // before each set dvar. //
|
||||
// //
|
||||
// Weight (1->1000) //
|
||||
// Selection is weighted random //
|
||||
// higher weights increase selection chance //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set scr_airdrop_mega_ac130 "2"
|
||||
// set scr_airdrop_mega_ammo "12"
|
||||
// set scr_airdrop_mega_counter_uav "16"
|
||||
// set scr_airdrop_mega_emp "0"
|
||||
// set scr_airdrop_mega_harrier_airstrike "5"
|
||||
// set scr_airdrop_mega_helicopter "5"
|
||||
// set scr_airdrop_mega_helicopter_flares "3"
|
||||
// set scr_airdrop_mega_helicopter_minigun "2"
|
||||
// set scr_airdrop_mega_nuke "0"
|
||||
// set scr_airdrop_mega_precision_airstrike "10"
|
||||
// set scr_airdrop_mega_predator_missile "14"
|
||||
// set scr_airdrop_mega_sentry "16"
|
||||
// set scr_airdrop_mega_stealth_airstrike "3"
|
||||
// set scr_airdrop_mega_uav "12"
|
||||
|
||||
//left alone. in case this missed your bat file. to view more game settings and map rotates check out your playlist.info file or use the right config for a cod4 style server.
|
||||
set party_enable 1
|
582
cfg/DedicatedConfigsWindows/userraw/server.cfg
Normal file
582
cfg/DedicatedConfigsWindows/userraw/server.cfg
Normal file
@ -0,0 +1,582 @@
|
||||
///////////////////////////////////////////////////
|
||||
/// IW4x Server Configuration file //
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
// SERVER NAME & COLORS TIPS //
|
||||
///////////////////////////////////////////////////
|
||||
// //
|
||||
// ^1 Red //
|
||||
// ^2 Green //
|
||||
// ^3 yellow //
|
||||
// ^4 Blue //
|
||||
// ^5 Cyan //
|
||||
// ^6 Pink //
|
||||
// ^7 White //
|
||||
// ^8 Depends on the team colors playing. //
|
||||
// ^9 grey //
|
||||
// ^0 Black //
|
||||
// ^: Rainbow colors //
|
||||
// //
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
|
||||
set sv_hostname "^2IW4x^7 Default Server" // Sets the server hostname
|
||||
set sv_motd "" // Sets a custom motd which is shown on the intel message loadscreen when a player joins. leave blank for defualt intel messages.
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// ADMIN INFO (Optional) //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set _Admin "" // Your username.
|
||||
set _Email "" // E-mail address. you can leave blank
|
||||
set _Website "" // Website
|
||||
set _Location "Earth" // Location
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Web Server Downloading (Optional) //
|
||||
//////////////////////////////////////////////////
|
||||
//set sv_wwwDownload "1" // Allow downloading maps and mods from different server instead of the game server.
|
||||
//set sv_wwwBaseUrl "http://" // http-Redirect to usermaps & mods folder on a web server. https does NOT work!
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// NON-GAMEPLAY CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set dedicated 2 // True if this is a dedicated server. (0-2) Default is 0 (= listen server). 1 (= dedicated LAN server), 2 (= dedicated internet server).
|
||||
set rcon_password "" // Access to your server to change stuff remotely or ingame. empty disabled
|
||||
set rcon_timeout "100" // Minimum allowed interval between rcon messages per IP address
|
||||
set sv_securityLevel "23" // Configures the servers security level.
|
||||
set sv_customTextColor "" // custom color for ^;
|
||||
set g_password "" // Password Protected Server. Leave blank if you want players to join or set password if you want to keep public out.
|
||||
set g_inactivity "300" // Enable auto kick feature for idle/AFK players
|
||||
set g_inactivitySpectator "500" // Time in seconds before a spectator gets kicked
|
||||
set logfile "2" // Enable loging 1-2? enable. 0 disable. Leave it on if you plan on using B3 or IW4MAdmin.
|
||||
set g_logSync "1" // 1 always flush games_mp.log, 0 only flush on game end. Recommended to stay on for b3 and IW4MAdmin
|
||||
set g_log "logs/games_mp.log" // Gamelog filename. If you edit this, Make sure you change B3.xml if you have bigbrotherbot. IW4MAdmin auto-detects however.
|
||||
set g_allowVote "0" // Enable voting on this server
|
||||
set sv_votesRequired "0" // Votes required for a vote to pass. Settings this to 0 will calculate the required votes based on the number of players (players / 2 + 1)
|
||||
set sv_allowClientConsole "1" // Enable or Disable players ability to access server commands
|
||||
set sv_maxclients "18" // Max players in your server.
|
||||
set party_maxplayers "18" // ^^Same as above for some weird reason^^^
|
||||
set sv_maxPing "0" // Maximum ping allowed during connection, any higher and players will get kicked. ( If you get 'server is for low ping players only' which happens to custom dlc, set this back to 0)
|
||||
set sv_timeout "20" // Timeout time period. You will timeout after (20) seconds when attempting to connect or if you are getting connection interruptions
|
||||
set sv_reconnectlimit "4" // How many times you can try to reconnect
|
||||
set com_logFilter "1" // Removes ~95% of unneeded lines from the log.
|
||||
set sv_pure "0" // verifying cilent files
|
||||
set sv_sayName "^7Console" // name server-side 'say' commands show up as
|
||||
set sv_floodProtect "1" // Chat Spam Protection
|
||||
set sv_kickBanTime "3600" // Kick Ban Duration. Time before player can re-join the server after getting kicked.
|
||||
set sv_randomBotNames "1" // Randomize the names.
|
||||
set sv_replaceBots "1" // Test clients will be replaced by connecting players when the server is full.
|
||||
set set party_enable "0" // Lobby Mode Server. Read the wiki more about this. If you want sv_maprotation & control your gametype settings. Leave this at 0.
|
||||
set sv_voice "1" // Allow Voice Chat (0 = Disable. 1 = Enabled (Teams only).)
|
||||
set sv_voicequality "9" // Voice Chat Quality. (0-9) Default is 3 (= Steam/Console quality). Use 9 for the best quality.
|
||||
set sv_allowAimAssist "1" // Enable Controller Aim-Assist.
|
||||
set sv_allowColoredNames "1" // Allow Colors in Player Names.
|
||||
set sv_randomMapRotation "0" // Randomize map rotation (takes maps and gamemodes from sv_maprotation and randomizes them).
|
||||
set sv_disableChat "0" // Disable chat messages from clients.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// BASE GAME CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// //
|
||||
// war - Team Deathmatch //
|
||||
// dm - Free-for-all //
|
||||
// dom - Domination //
|
||||
// koth - Headquarters //
|
||||
// sab - Sabotage //
|
||||
// sd - Search and Destroy //
|
||||
// arena - Arena //
|
||||
// dd - Demolition //
|
||||
// ctf - Capture the Flag //
|
||||
// oneflag - One-Flag CTF //
|
||||
// gtnw - Global Thermo-Nuclear War //
|
||||
// //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set g_gametype "war" // Default gametype in case map rotation doesn't have any gametypes. Choose a gametype from the list above.
|
||||
set scr_player_forcerespawn "1" // Players respawn automatically after being fragged
|
||||
set scr_thirdperson "0" // third-person mode
|
||||
set scr_game_hardpoints "1" // Enable/Disable Killstreak rewards
|
||||
set scr_hardpoint_allowhelicopter "1" // Allow Attack Helicopters
|
||||
set scr_hardpoint_allowuav "1" // Allow UAV
|
||||
set scr_hardpoint_allowartillery "1" // Allow Airstrikes
|
||||
set scr_game_perks "1" // Allow players to have perks
|
||||
set scr_game_allowkillcam "1" // Allow Killcam.
|
||||
set scr_nukeTimer "10" // Timer when nuke goes off
|
||||
set scr_diehard "0" // die-hard mode. Teammates will have to revive each other.
|
||||
set scr_teambalance "1" // Enable or Disable auto balance.
|
||||
set scr_game_spectatetype "2" // Allow Spectators. 0 Disabled, 1 Team/Player only, 2 Free
|
||||
set scr_player_suicidespawndelay "0" // Wait before you respawn if you committed suicide.
|
||||
set scr_player_sprinttime "4" // Sprint time, duration a player can run.
|
||||
set scr_game_killstreakdelay "8" // Delay your killstreaks
|
||||
set scr_game_objectiveStreaks "1" // Enable Chopper, AC130 and Nuke
|
||||
set scr_classic "0" // Enable old-school COD4 killstreaks. UAV, Air Strike, Heli Only.
|
||||
set bg_elevators "1" // Elevator Glitch Settings (default: 1 (normal). 0 = off, 2 = easy).
|
||||
set bg_rocketJump "0" // Enable CoD4 Rocket Jumps.
|
||||
set bg_rocketJumpScale "64" // The scale applied to the pushback force of a rocket.
|
||||
set bg_climbAnything "0" // Treat any surface as a ladder.
|
||||
set bg_bounces "0" // Enable Bounces (default: 0 (disabled). 1 = enabled, 2 = double).
|
||||
set bg_bouncesAllAngles "0" // Enable Bounces from all angles (default: 0 (disabled). 1 = simple, 2 = all surfaces).
|
||||
set bg_disableLandingSlowdown "0" // Toggle landing slowdown.
|
||||
set bg_bunnyHopAuto "0" // Constantly jump when holding space.
|
||||
set bg_playerCollision "1" // Push intersecting players away from each other.
|
||||
set bg_playerEjection "1" // Push intersecting players away from each other.
|
||||
set bg_surfacePenetration "0" // Values greater than 0 override the surface penetration depth (ability to hit players through obstacles).
|
||||
set bg_bulletRange "8192" // Maximum Range used when calculating the bullet end position.
|
||||
set bg_lean "1" // Enable CoD4 leaning.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// XP BOOST CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for XP config //
|
||||
// by removing the // before each set dvar. //
|
||||
// Change "war" gametype to your liking. //
|
||||
// //
|
||||
// DO NOT ABUSE! Some people like to rank. //
|
||||
// DON'T BE A DICK! Warn HIGH XP via hostname. //
|
||||
// Don't know what you doing? Don't touch it! //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
//set scr_xpscale "2" // IW's way of Double XP.
|
||||
|
||||
//set scr_war_score_kill "0" // Amount of XP by each kill.
|
||||
//set scr_war_score_headshot "0" // Amount of XP by each headshot.
|
||||
//set scr_war_score_death "0" // Amount of XP by each death.
|
||||
//set scr_war_score_suicide "0" // Amount of XP by each suicide.
|
||||
//set scr_war_score_assist "0" // Amount of XP by each assist.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// HARDCORE CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for some hardcore //
|
||||
// by removing the // before each set dvar. //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set g_hardcore "1" // Enable hardcore mode
|
||||
// set scr_hardcore "1" // Enable hardcore mode again...
|
||||
// set ui_hud_hardcore "1" // Removes heads up display in hardcore mode.
|
||||
// set scr_game_deathpointloss "0" // Points Loss on death XP.
|
||||
// set scr_game_onlyheadshots "0" // Enable/Disable Only Headshots mode. You can only kill players by taking headshots.
|
||||
// set scr_player_maxhealth "30" // Percent of Health players will have on Respawn. (100 is normal. 30 is hardcore)
|
||||
// set scr_team_fftype "1" // Enable or Disable Friendly Fire. (1 on, 2 reflect, 3 shared)
|
||||
// set scr_player_healthregentime "0" // Time it takes you to recover damage. (5 is normal, 0 is hardcore)
|
||||
// set scr_team_kickteamkillers "5" // Anyone who team kills, gets kicked automatically if you enable this feature.
|
||||
// set scr_team_teamkillspawndelay "20" // Team Killer gets a respawn penalty of specified seconds (20).
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// AIRDROP CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for airdrop config //
|
||||
// by removing the // before each set dvar. //
|
||||
// //
|
||||
// Weight (1->1000) //
|
||||
// Selection is weighted random //
|
||||
// higher weights increase selection chance //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set scr_airdrop_ac130 "3"
|
||||
// set scr_airdrop_ammo "17"
|
||||
// set scr_airdrop_counter_uav "15"
|
||||
// set scr_airdrop_emp "1"
|
||||
// set scr_airdrop_harrier_airstrike "7"
|
||||
// set scr_airdrop_helicopter "7"
|
||||
// set scr_airdrop_helicopter_flares "5"
|
||||
// set scr_airdrop_helicopter_minigun "3"
|
||||
// set scr_airdrop_nuke "0"
|
||||
// set scr_airdrop_precision_airstrike "11"
|
||||
// set scr_airdrop_predator_missile "12"
|
||||
// set scr_airdrop_sentry "12"
|
||||
// set scr_airdrop_stealth_airstrike "5"
|
||||
// set scr_airdrop_uav "17"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// EMERGENCY AIRDROP CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for airdrop config //
|
||||
// by removing the // before each set dvar. //
|
||||
// //
|
||||
// Weight (1->1000) //
|
||||
// Selection is weighted random //
|
||||
// higher weights increase selection chance //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set scr_airdrop_mega_ac130 "2"
|
||||
// set scr_airdrop_mega_ammo "12"
|
||||
// set scr_airdrop_mega_counter_uav "16"
|
||||
// set scr_airdrop_mega_emp "0"
|
||||
// set scr_airdrop_mega_harrier_airstrike "5"
|
||||
// set scr_airdrop_mega_helicopter "5"
|
||||
// set scr_airdrop_mega_helicopter_flares "3"
|
||||
// set scr_airdrop_mega_helicopter_minigun "2"
|
||||
// set scr_airdrop_mega_nuke "0"
|
||||
// set scr_airdrop_mega_precision_airstrike "10"
|
||||
// set scr_airdrop_mega_predator_missile "14"
|
||||
// set scr_airdrop_mega_sentry "16"
|
||||
// set scr_airdrop_mega_stealth_airstrike "3"
|
||||
// set scr_airdrop_mega_uav "12"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// FREE FOR ALL GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_dm_scorelimit "1500" // Score limit to win the game.
|
||||
set scr_dm_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_dm_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_dm_numlives "0" // Number of lives per player. 0 for unlimited.
|
||||
set scr_dm_roundlimit "1" // Rounds per game.
|
||||
set scr_dm_winlimit "1" // amount of wins needed to win a round-based game
|
||||
set scr_dm_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// TEAM DEATHMATCH GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_war_scorelimit "7500" // Score limit to win the game.
|
||||
set scr_war_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_war_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_war_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||
set scr_war_numlives "0" // Number of lives per player 0 for unlimited.
|
||||
set scr_war_roundlimit "1" // Rounds per game.
|
||||
set scr_war_winlimit "1" // amount of wins needed to win a round-based game
|
||||
set scr_war_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// DOMINATION GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_dom_scorelimit "200" // Score limit to win the game.
|
||||
set scr_dom_timelimit "0" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_dom_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_dom_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||
set scr_dom_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
||||
set scr_dom_roundlimit "1" // Rounds per game
|
||||
set scr_dom_winlimit "1" // amount of wins needed to win a round-based game
|
||||
set scr_dom_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// DEMOLITION GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_dd_scorelimit "1" // Score limit needed to win.
|
||||
set scr_dd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_dd_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_dd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||
set scr_dd_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
||||
set scr_dd_roundswitch "1" // Rounds before the teams switch the sides.
|
||||
set scr_dd_bombtimer "45" // Time the bomb takes to detonate.
|
||||
set scr_dd_defusetime "5" // Time taken to defuse the bomb.
|
||||
set scr_dd_planttime "5" // Time it takes to plant a bomb in seconds.
|
||||
set scr_dd_roundlimit "3" // Rounds the game is limited to, if there are no winners.
|
||||
set scr_dd_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// SEARCH AND DESTROY GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_sd_scorelimit "1" // Score limit required to win the game.
|
||||
set scr_sd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_sd_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_sd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||
set scr_sd_numlives "1" // Number of lives per player per game.
|
||||
set scr_sd_roundlimit "0" // Rounds the game is limited to 0 for unlimited.
|
||||
set scr_sd_winlimit "4" // amount of wins needed to win a round-based game.
|
||||
set scr_sd_roundswitch "3" // after X rounds, switch sides.
|
||||
set scr_sd_bombtimer "45" // Time taken for the bomb to detonate.
|
||||
set scr_sd_defusetime "5" // Time taken to defuse the bomb.
|
||||
set scr_sd_multibomb "0" // allow multiple people to 'have the bomb'.
|
||||
set scr_sd_planttime "5" // How long will it take player to 'plant the bomb'.
|
||||
set scr_sd_promode "0"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// SABOTAGE GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_sab_scorelimit "0" // Score limit to win the match.
|
||||
set scr_sab_timelimit "20" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_sab_bombtimer "30" // Duration in seconds the bomb takes to detonate.
|
||||
set scr_sab_defusetime "5" // Time taken to defuse the bomb.
|
||||
set scr_sab_hotpotato "0" // One bomb that the teams must fight over. One defending and one have to plant at the site.
|
||||
set scr_sab_numlives "0" // Number of lives per player per game.
|
||||
set scr_sab_planttime "2.5" // Time taken to plant the bomb.
|
||||
set scr_sab_playerrespawndelay "7.5 // Time before respawn.
|
||||
set scr_sab_roundlimit "1" // Rounds per game.
|
||||
set scr_sab_roundswitch "1" // Rounds needed to be played before the teams switch sides.
|
||||
set scr_sab_waverespawndelay "0" // Time delay for first respawn before the game.
|
||||
set scr_sab_promode "0"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// CAPTURE THE FLAG GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_ctf_scorelimit "0" // Target score before the round ends.
|
||||
set scr_ctf_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_ctf_numlives "0" // Number of lives per player 0 for unlimited.
|
||||
set scr_ctf_halftime "1" // Half-Time
|
||||
set scr_ctf_roundlimit "1" // How many rounds match would last.
|
||||
set scr_ctf_returntime "30" // How many seconds before flag returns to base without nobody touching it.
|
||||
set scr_ctf_playerrespawndelay "0" // Respawn wait in seconds.
|
||||
set scr_ctf_waverespawndelay "10" // Time delay for first respawn before the game.
|
||||
set scr_ctf_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// ONE FLAG GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_oneflag_scorelimit "1" // Target score before the round ends.
|
||||
set scr_oneflag_timelimit "3" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_oneflag_numlives "0" // number of lives per player 0 for unlimited.
|
||||
set scr_oneflag_playerrespawndelay "0" // Respawn wait in seconds.
|
||||
set scr_oneflag_roundlimit "1" // How many rounds match would last.
|
||||
set scr_oneflag_roundswitch "1" // Rounds before the teams switch sides.
|
||||
set scr_oneflag_waverespawndelay "0" // First respawn delay for each round.
|
||||
set scr_oneflag_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// HEADQUARTERS GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_koth_scorelimit "250" // Score limit to win the game.
|
||||
set scr_koth_timelimit "15" // Duration in minutes the game will continue if the score isn't reached.
|
||||
set scr_koth_numlives "0" // Number of lives per game. 0 for unlimited.
|
||||
set scr_koth_playerrespawndelay "0" // Players respawn wait.
|
||||
set scr_koth_roundlimit "1" // Rounds to be played.
|
||||
set scr_koth_roundswitch "1" // Rounds to be played before teams switch sides.
|
||||
set scr_koth_winlimit "1" // rounds per game
|
||||
set scr_koth_waverespawndelay "0" // First respawn delay for each round.
|
||||
set scr_koth_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// ARENA GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_arena_scorelimit "1" // Score limit to win the game.
|
||||
set scr_arena_timelimit "2.5" // Duration in minutes the game will continue if the score isn't reached.
|
||||
set scr_arena_numlives "1" // Number of lives per game 0 for unlimited.
|
||||
set scr_arena_roundlimit "0" // Rounds to be played.
|
||||
set scr_arena_roundswitch "3" // Rounds before the teams switch sides.
|
||||
set scr_arena_winlimit "4" // rounds per game
|
||||
set scr_arena_promode "0"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// GLOBAL THERMONUCLEAR WAR GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_gtnw_scorelimit "101" // Score limit to win the game.
|
||||
set scr_gtnw_timelimit "10" // Duration in minutes the game will continue if the score isn't reached.
|
||||
set scr_gtnw_numlives "0" // Number of lives per game 0 for unlimited.
|
||||
set scr_gtnw_playerrespawndelay "0" // Players respawn wait.
|
||||
set scr_gtnw_roundlimit "1" // Rounds to be played.
|
||||
set scr_gtnw_roundswitch "0" // Rounds before the teams switch sides.
|
||||
set scr_gtnw_winlimit "1" // rounds per game
|
||||
set scr_gtnw_waverespawndelay "0" // First respawn delay for each round.
|
||||
set scr_gtnw_promode "0"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// MAP SHORT NAMES ROTATION LIST //
|
||||
//////////////////////////////////////////////////
|
||||
// //
|
||||
// mp_afghan - Afghan //
|
||||
// mp_derail - Derail //
|
||||
// mp_estate - Estate //
|
||||
// mp_favela - Favela //
|
||||
// mp_highrise - Highrise //
|
||||
// mp_invasion - Invasion //
|
||||
// mp_checkpoint - Karachi //
|
||||
// mp_quarry - Quarry //
|
||||
// mp_rundown - Rundown //
|
||||
// mp_rust - Rust //
|
||||
// mp_boneyard - Scrapyard //
|
||||
// mp_nightshift - Skidrow //
|
||||
// mp_subbase - Sub Base //
|
||||
// mp_terminal - Terminal //
|
||||
// mp_underpass - Underpass //
|
||||
// mp_brecourt - Wasteland //
|
||||
// //
|
||||
//// DLC1 STIMULUS ///////////////////////////////
|
||||
// //
|
||||
// mp_complex - Bailout //
|
||||
// mp_crash - Crash //
|
||||
// mp_overgrown - Overgrown //
|
||||
// mp_compact - Salvage //
|
||||
// mp_storm - Storm //
|
||||
// //
|
||||
//// DLC2 RESURGENCE /////////////////////////////
|
||||
// //
|
||||
// mp_abandon - Carnival //
|
||||
// mp_fuel2 - Fuel //
|
||||
// mp_strike - Strike //
|
||||
// mp_trailerpark - Trailer Park //
|
||||
// mp_vacant - Vacant //
|
||||
// //
|
||||
//// DLC3 NUKETOWN ///////////////////////////////
|
||||
// //
|
||||
// mp_nuked - Nuketown //
|
||||
// //
|
||||
/// DLC4 CLASSICS 1 //////////////////////////////
|
||||
// //
|
||||
// mp_cross_fire - Crossfire //
|
||||
// mp_bloc - Bloc //
|
||||
// mp_cargoship - Cargoship //
|
||||
// //
|
||||
/// DLC5 CLASSICS 2 //////////////////////////////
|
||||
// //
|
||||
// mp_killhouse - Killhouse //
|
||||
// mp_bog_sh - Bog //
|
||||
// //
|
||||
/// DLC6 FREIGHTER ///////////////////////////////
|
||||
// //
|
||||
// mp_cargoship_sh - Freighter //
|
||||
// //
|
||||
/// DLC7 RESURRECTION ////////////////////////////
|
||||
// //
|
||||
// mp_shipment - Shipment //
|
||||
// mp_shipment_long - Long:Shipment //
|
||||
// mp_rust_long - Long: Rust //
|
||||
// mp_firingrange - Firing Range //
|
||||
// //
|
||||
/// DLC8 RECYCLED ////////////////////////////////
|
||||
// //
|
||||
// mp_storm_spring - Chemical Plant //
|
||||
// mp_fav_tropical - Tropical: Favela //
|
||||
// mp_estate_tropical - Tropical: Estate //
|
||||
// mp_crash_tropical - Tropical: Crash //
|
||||
// mp_bloc_sh - Forgotten City //
|
||||
// //
|
||||
/// DLC9 CLASSICS 3 //////////////////////////////
|
||||
// //
|
||||
// mp_backlot - Backlot //
|
||||
// mp_broadcast - Broadcast //
|
||||
// mp_carentan - Chinatown //
|
||||
// mp_citystreets - District //
|
||||
// mp_convoy - Ambush //
|
||||
// mp_countdown - Countdown //
|
||||
// mp_crash_snow - Winter Crash //
|
||||
// mp_farm - Downpour //
|
||||
// mp_pipeline - Pipeline //
|
||||
// mp_showdown - Showdown //
|
||||
// //
|
||||
/// DLC10 MW3 ////////////////////////////////////
|
||||
// //
|
||||
// mp_dome - Dome //
|
||||
// mp_hardhat - Hardhat //
|
||||
// mp_paris - Resistance //
|
||||
// mp_seatown - Seatown //
|
||||
// mp_bravo - Mission //
|
||||
// mp_underground - Underground //
|
||||
// mp_plaza2 - Arkaden //
|
||||
// mp_village - Village //
|
||||
// mp_alpha - Lockdown //
|
||||
// //
|
||||
/// SP MAPS to MP ////////////////////////////////
|
||||
// //
|
||||
// oilrig - Oilrig //
|
||||
// iw4_credits - Test map //
|
||||
// co_hunted - Village //
|
||||
// //
|
||||
// Example: //
|
||||
// sv_maprotation "map mp_rust map mp_nuked" //
|
||||
// //
|
||||
// Example 24/7 Map: //
|
||||
// sv_maprotation "map mp_highrise" //
|
||||
// //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// GAMETYPE ROTATION LIST (OPTIONAL) //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// List of gametypes you can use on sv_maprotation to mix gametypes. //
|
||||
// or skip this if you plan on hosting 1 gametype only server. //
|
||||
// //
|
||||
// war - Team Deathmatch //
|
||||
// dm - Free-for-all //
|
||||
// dom - Domination //
|
||||
// koth - Headquarters //
|
||||
// sab - Sabotage //
|
||||
// sd - Search and Destroy //
|
||||
// arena - Arena //
|
||||
// dd - Demolition //
|
||||
// ctf - Capture the Flag //
|
||||
// oneflag - One-Flag CTF //
|
||||
// gtnw - Global Thermo-Nuclear War //
|
||||
// //
|
||||
// Example for mix gametype & map rotation: //
|
||||
// sv_maprotation "gametype dm map mp_rust gametype sd map mp_crash" //
|
||||
// //
|
||||
// You can add additional maps to the certain gametype until it reach //
|
||||
// the next gametype command. //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
addGametype war
|
||||
addMap mp_abandon
|
||||
addMap mp_afghan
|
||||
addMap mp_alpha
|
||||
addMap mp_backlot
|
||||
addMap mp_bloc
|
||||
addMap mp_bloc_sh
|
||||
addMap mp_bog_sh
|
||||
addMap mp_boneyard
|
||||
addMap mp_bravo
|
||||
addMap mp_brecourt
|
||||
addMap mp_broadcast
|
||||
addMap mp_carentan
|
||||
addMap mp_cargoship
|
||||
addMap mp_cargoship_sh
|
||||
addMap mp_checkpoint
|
||||
addMap mp_citystreets
|
||||
addMap mp_compact
|
||||
addMap mp_complex
|
||||
addMap mp_convoy
|
||||
addMap mp_countdown
|
||||
addMap mp_crash
|
||||
addMap mp_crash_snow
|
||||
addMap mp_crash_tropical
|
||||
addMap mp_cross_fire
|
||||
addMap mp_derail
|
||||
addMap mp_dome
|
||||
addMap mp_estate
|
||||
addMap mp_estate_tropical
|
||||
addMap mp_farm
|
||||
addMap mp_fav_tropical
|
||||
addMap mp_favela
|
||||
addMap mp_firingrange
|
||||
addMap mp_fuel2
|
||||
addMap mp_hardhat
|
||||
addMap mp_highrise
|
||||
addMap mp_invasion
|
||||
addMap mp_killhouse
|
||||
addMap mp_nightshift
|
||||
addMap mp_nuked
|
||||
addMap mp_overgrown
|
||||
addMap mp_paris
|
||||
addMap mp_pipeline
|
||||
addMap mp_plaza2
|
||||
addMap mp_quarry
|
||||
addMap mp_rundown
|
||||
addMap mp_rust
|
||||
addMap mp_rust_long
|
||||
addMap mp_seatown
|
||||
addMap mp_shipment
|
||||
addMap mp_shipment_long
|
||||
addMap mp_showdown
|
||||
addMap mp_storm
|
||||
addMap mp_storm_spring
|
||||
addMap mp_strike
|
||||
addMap mp_subbase
|
||||
addMap mp_terminal
|
||||
addMap mp_trailerpark
|
||||
addMap mp_underground
|
||||
addMap mp_underpass
|
||||
addMap mp_vacant
|
||||
addMap mp_village
|
582
cfg/DedicatedConfigsWindows/userraw/serverlan.cfg
Normal file
582
cfg/DedicatedConfigsWindows/userraw/serverlan.cfg
Normal file
@ -0,0 +1,582 @@
|
||||
///////////////////////////////////////////////////
|
||||
/// IW4x Server Configuration file //
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
// SERVER NAME & COLORS TIPS //
|
||||
///////////////////////////////////////////////////
|
||||
// //
|
||||
// ^1 Red //
|
||||
// ^2 Green //
|
||||
// ^3 yellow //
|
||||
// ^4 Blue //
|
||||
// ^5 Cyan //
|
||||
// ^6 Pink //
|
||||
// ^7 White //
|
||||
// ^8 Depends on the team colors playing. //
|
||||
// ^9 grey //
|
||||
// ^0 Black //
|
||||
// ^: Rainbow colors //
|
||||
// //
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
|
||||
set sv_hostname "^2IW4x^7 LAN Server" // Sets the server hostname
|
||||
set sv_motd "" // Sets a custom motd which is shown on the intel message loadscreen when a player joins. leave blank for defualt intel messages.
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// ADMIN INFO (Optional) //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set _Admin "" // Your username.
|
||||
set _Email "" // E-mail address. you can leave blank
|
||||
set _Website "" // Website
|
||||
set _Location "Earth" // Location
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Web Server Downloading (Optional) //
|
||||
//////////////////////////////////////////////////
|
||||
//set sv_wwwDownload "1" // Allow downloading maps and mods from different server instead of the game server.
|
||||
//set sv_wwwBaseUrl "http://127.0.0.1/IW4x/" // http-Redirect to usermaps & mods folder on a web server. https does NOT work!
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// NON-GAMEPLAY CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set dedicated 1 // True if this is a dedicated server. (0-2) Default is 0 (= listen server). 1 (= dedicated LAN server), 2 (= dedicated internet server).
|
||||
set rcon_password "" // Access to your server to change stuff remotely or ingame. empty disabled
|
||||
set rcon_timeout "100" // Minimum allowed interval between rcon messages per IP address
|
||||
set sv_securityLevel "23" // Configures the servers security level.
|
||||
set sv_customTextColor "" // custom color for ^;
|
||||
set g_password "" // Password Protected Server. Leave blank if you want players to join or set password if you want to keep public out.
|
||||
set g_inactivity "0" // Enable auto kick feature for idle/AFK players
|
||||
set g_inactivitySpectator "0" // Time in seconds before a spectator gets kicked
|
||||
set logfile "2" // Enable loging 1-2? enable. 0 disable. Leave it on if you plan on using B3 or IW4MAdmin.
|
||||
set g_logSync "1" // 1 always flush games_mp.log, 0 only flush on game end
|
||||
set g_log "logs/localgame_mp.log" // Gamelog filename.
|
||||
set g_allowVote "0" // Enable voting on this server
|
||||
set sv_votesRequired "0" // Votes required for a vote to pass. Settings this to 0 will calculate the required votes based on the number of players (players / 2 + 1)
|
||||
set sv_allowClientConsole "1" // Enable or Disable players ability to access server commands
|
||||
set sv_maxclients "18" // Max players in your server.
|
||||
set party_maxplayers "18" // ^^Same as above for some weird reason^^^
|
||||
set sv_maxPing "0" // Maximum ping allowed during connection, any higher and players will get kicked. ( If you get 'server is for low ping players only' which happens to custom dlc, set this back to 0)
|
||||
set sv_timeout "20" // Timeout time period. You will timeout after (20) seconds when attempting to connect or if you are getting connection interruptions
|
||||
set sv_reconnectlimit "3" // How many times you can try to reconnect
|
||||
set com_logFilter "1" // Removes ~95% of unneeded lines from the log.
|
||||
set sv_pure "0" // verifying cilent files
|
||||
set sv_sayName "^7Console" // name server-side 'say' commands show up as
|
||||
set sv_floodProtect "0" // Chat Spam Protection
|
||||
set sv_kickBanTime "3600" // Kick Ban Duration. Time before player can re-join the server after getting kicked.
|
||||
set sv_randomBotNames "1" // Randomize the names.
|
||||
set sv_replaceBots "1" // Test clients will be replaced by connecting players when the server is full.
|
||||
set set party_enable "0" // Lobby Mode Server. Read the wiki more about this. If you want sv_maprotation & control your gametype settings. Leave this at 0.
|
||||
set sv_voice "1" // Allow Voice Chat (0 = Disable. 1 = Enabled (Teams only).)
|
||||
set sv_voicequality "9" // Voice Chat Quality. (0-9) Default is 3 (= Steam/Console quality). Use 9 for the best quality.
|
||||
set sv_allowAimAssist "1" // Enable Controller Aim-Assist.
|
||||
set sv_allowColoredNames "1" // Allow Colors in Player Names.
|
||||
set sv_randomMapRotation "0" // Randomize map rotation (takes maps and gamemodes from sv_maprotation and randomizes them).
|
||||
set sv_disableChat "0" // Disable chat messages from clients.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// BASE GAME CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// //
|
||||
// war - Team Deathmatch //
|
||||
// dm - Free-for-all //
|
||||
// dom - Domination //
|
||||
// koth - Headquarters //
|
||||
// sab - Sabotage //
|
||||
// sd - Search and Destroy //
|
||||
// arena - Arena //
|
||||
// dd - Demolition //
|
||||
// ctf - Capture the Flag //
|
||||
// oneflag - One-Flag CTF //
|
||||
// gtnw - Global Thermo-Nuclear War //
|
||||
// //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set g_gametype "war" // Default gametype in case map rotation doesn't have any gametypes. Choose a gametype from the list above.
|
||||
set scr_player_forcerespawn "1" // Players respawn automatically after being fragged
|
||||
set scr_thirdperson "0" // third-person mode
|
||||
set scr_game_hardpoints "1" // Enable/Disable Killstreak rewards
|
||||
set scr_hardpoint_allowhelicopter "1" // Allow Attack Helicopters
|
||||
set scr_hardpoint_allowuav "1" // Allow UAV
|
||||
set scr_hardpoint_allowartillery "1" // Allow Airstrikes
|
||||
set scr_game_perks "1" // Allow players to have perks
|
||||
set scr_game_allowkillcam "1" // Allow Killcam.
|
||||
set scr_nukeTimer "10" // Timer when nuke goes off
|
||||
set scr_diehard "0" // die-hard mode. Teammates will have to revive each other.
|
||||
set scr_teambalance "1" // Enable or Disable auto balance.
|
||||
set scr_game_spectatetype "2" // Allow Spectators. 0 Disabled, 1 Team/Player only, 2 Free
|
||||
set scr_player_suicidespawndelay "0" // Wait before you respawn if you committed suicide.
|
||||
set scr_player_sprinttime "4" // Sprint time, duration a player can run.
|
||||
set scr_game_killstreakdelay "8" // Delay your killstreaks
|
||||
set scr_game_objectiveStreaks "1" // Enable Chopper, AC130 and Nuke
|
||||
set scr_classic "0" // Enable old-school COD4 killstreaks. UAV, Air Strike, Heli Only.
|
||||
set bg_elevators "1" // Elevator Glitch Settings (default: 1 (normal). 0 = off, 2 = easy).
|
||||
set bg_rocketJump "0" // Enable CoD4 Rocket Jumps.
|
||||
set bg_rocketJumpScale "64" // The scale applied to the pushback force of a rocket.
|
||||
set bg_climbAnything "0" // Treat any surface as a ladder.
|
||||
set bg_bounces "0" // Enable Bounces (default: 0 (disabled). 1 = enabled, 2 = double).
|
||||
set bg_bouncesAllAngles "0" // Enable Bounces from all angles (default: 0 (disabled). 1 = simple, 2 = all surfaces).
|
||||
set bg_disableLandingSlowdown "0" // Toggle landing slowdown.
|
||||
set bg_bunnyHopAuto "0" // Constantly jump when holding space.
|
||||
set bg_playerCollision "1" // Push intersecting players away from each other.
|
||||
set bg_playerEjection "1" // Push intersecting players away from each other.
|
||||
set bg_surfacePenetration "0" // Values greater than 0 override the surface penetration depth (ability to hit players through obstacles).
|
||||
set bg_bulletRange "8192" // Maximum Range used when calculating the bullet end position.
|
||||
set bg_lean "1" // Enable CoD4 leaning.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// XP BOOST CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for XP config //
|
||||
// by removing the // before each set dvar. //
|
||||
// Change "war" gametype to your liking. //
|
||||
// //
|
||||
// DO NOT ABUSE! Some people like to rank. //
|
||||
// DON'T BE A DICK! Warn HIGH XP via hostname. //
|
||||
// Don't know what you doing? Don't touch it! //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
//set scr_xpscale "2" // IW's way of Double XP.
|
||||
|
||||
//set scr_war_score_kill "0" // Amount of XP by each kill.
|
||||
//set scr_war_score_headshot "0" // Amount of XP by each headshot.
|
||||
//set scr_war_score_death "0" // Amount of XP by each death.
|
||||
//set scr_war_score_suicide "0" // Amount of XP by each suicide.
|
||||
//set scr_war_score_assist "0" // Amount of XP by each assist.
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// HARDCORE CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for some hardcore //
|
||||
// by removing the // before each set dvar. //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set g_hardcore "1" // Enable hardcore mode
|
||||
// set scr_hardcore "1" // Enable hardcore mode again...
|
||||
// set ui_hud_hardcore "1" // Removes heads up display in hardcore mode.
|
||||
// set scr_game_deathpointloss "0" // Points Loss on death XP.
|
||||
// set scr_game_onlyheadshots "0" // Enable/Disable Only Headshots mode. You can only kill players by taking headshots.
|
||||
// set scr_player_maxhealth "30" // Percent of Health players will have on Respawn. (100 is normal. 30 is hardcore)
|
||||
// set scr_team_fftype "1" // Enable or Disable Friendly Fire. (1 on, 2 reflect, 3 shared)
|
||||
// set scr_player_healthregentime "0" // Time it takes you to recover damage. (5 is normal, 0 is hardcore)
|
||||
// set scr_team_kickteamkillers "5" // Anyone who team kills, gets kicked automatically if you enable this feature.
|
||||
// set scr_team_teamkillspawndelay "20" // Team Killer gets a respawn penalty of specified seconds (20).
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// AIRDROP CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for airdrop config //
|
||||
// by removing the // before each set dvar. //
|
||||
// //
|
||||
// Weight (1->1000) //
|
||||
// Selection is weighted random //
|
||||
// higher weights increase selection chance //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set scr_airdrop_ac130 "3"
|
||||
// set scr_airdrop_ammo "17"
|
||||
// set scr_airdrop_counter_uav "15"
|
||||
// set scr_airdrop_emp "1"
|
||||
// set scr_airdrop_harrier_airstrike "7"
|
||||
// set scr_airdrop_helicopter "7"
|
||||
// set scr_airdrop_helicopter_flares "5"
|
||||
// set scr_airdrop_helicopter_minigun "3"
|
||||
// set scr_airdrop_nuke "0"
|
||||
// set scr_airdrop_precision_airstrike "11"
|
||||
// set scr_airdrop_predator_missile "12"
|
||||
// set scr_airdrop_sentry "12"
|
||||
// set scr_airdrop_stealth_airstrike "5"
|
||||
// set scr_airdrop_uav "17"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// EMERGENCY AIRDROP CONFIGURATION //
|
||||
//////////////////////////////////////////////////
|
||||
// uncomment below commands for airdrop config //
|
||||
// by removing the // before each set dvar. //
|
||||
// //
|
||||
// Weight (1->1000) //
|
||||
// Selection is weighted random //
|
||||
// higher weights increase selection chance //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// set scr_airdrop_mega_ac130 "2"
|
||||
// set scr_airdrop_mega_ammo "12"
|
||||
// set scr_airdrop_mega_counter_uav "16"
|
||||
// set scr_airdrop_mega_emp "0"
|
||||
// set scr_airdrop_mega_harrier_airstrike "5"
|
||||
// set scr_airdrop_mega_helicopter "5"
|
||||
// set scr_airdrop_mega_helicopter_flares "3"
|
||||
// set scr_airdrop_mega_helicopter_minigun "2"
|
||||
// set scr_airdrop_mega_nuke "0"
|
||||
// set scr_airdrop_mega_precision_airstrike "10"
|
||||
// set scr_airdrop_mega_predator_missile "14"
|
||||
// set scr_airdrop_mega_sentry "16"
|
||||
// set scr_airdrop_mega_stealth_airstrike "3"
|
||||
// set scr_airdrop_mega_uav "12"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// FREE FOR ALL GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_dm_scorelimit "1500" // Score limit to win the game.
|
||||
set scr_dm_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_dm_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_dm_numlives "0" // Number of lives per player. 0 for unlimited.
|
||||
set scr_dm_roundlimit "1" // Rounds per game.
|
||||
set scr_dm_winlimit "1" // amount of wins needed to win a round-based game
|
||||
set scr_dm_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// TEAM DEATHMATCH GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_war_scorelimit "7500" // Score limit to win the game.
|
||||
set scr_war_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_war_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_war_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||
set scr_war_numlives "0" // Number of lives per player 0 for unlimited.
|
||||
set scr_war_roundlimit "1" // Rounds per game.
|
||||
set scr_war_winlimit "1" // amount of wins needed to win a round-based game
|
||||
set scr_war_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// DOMINATION GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_dom_scorelimit "200" // Score limit to win the game.
|
||||
set scr_dom_timelimit "0" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_dom_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_dom_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||
set scr_dom_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
||||
set scr_dom_roundlimit "1" // Rounds per game
|
||||
set scr_dom_winlimit "1" // amount of wins needed to win a round-based game
|
||||
set scr_dom_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// DEMOLITION GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_dd_scorelimit "1" // Score limit needed to win.
|
||||
set scr_dd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_dd_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_dd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||
set scr_dd_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
||||
set scr_dd_roundswitch "1" // Rounds before the teams switch the sides.
|
||||
set scr_dd_bombtimer "45" // Time the bomb takes to detonate.
|
||||
set scr_dd_defusetime "5" // Time taken to defuse the bomb.
|
||||
set scr_dd_planttime "5" // Time it takes to plant a bomb in seconds.
|
||||
set scr_dd_roundlimit "3" // Rounds the game is limited to, if there are no winners.
|
||||
set scr_dd_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// SEARCH AND DESTROY GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_sd_scorelimit "1" // Score limit required to win the game.
|
||||
set scr_sd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_sd_playerrespawndelay "0" // How long player will wait until respawn.
|
||||
set scr_sd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||
set scr_sd_numlives "1" // Number of lives per player per game.
|
||||
set scr_sd_roundlimit "0" // Rounds the game is limited to 0 for unlimited.
|
||||
set scr_sd_winlimit "4" // amount of wins needed to win a round-based game.
|
||||
set scr_sd_roundswitch "3" // after X rounds, switch sides.
|
||||
set scr_sd_bombtimer "45" // Time taken for the bomb to detonate.
|
||||
set scr_sd_defusetime "5" // Time taken to defuse the bomb.
|
||||
set scr_sd_multibomb "0" // allow multiple people to 'have the bomb'.
|
||||
set scr_sd_planttime "5" // How long will it take player to 'plant the bomb'.
|
||||
set scr_sd_promode "0"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// SABOTAGE GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_sab_scorelimit "0" // Score limit to win the match.
|
||||
set scr_sab_timelimit "20" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_sab_bombtimer "30" // Duration in seconds the bomb takes to detonate.
|
||||
set scr_sab_defusetime "5" // Time taken to defuse the bomb.
|
||||
set scr_sab_hotpotato "0" // One bomb that the teams must fight over. One defending and one have to plant at the site.
|
||||
set scr_sab_numlives "0" // Number of lives per player per game.
|
||||
set scr_sab_planttime "2.5" // Time taken to plant the bomb.
|
||||
set scr_sab_playerrespawndelay "7.5 // Time before respawn.
|
||||
set scr_sab_roundlimit "1" // Rounds per game.
|
||||
set scr_sab_roundswitch "1" // Rounds needed to be played before the teams switch sides.
|
||||
set scr_sab_waverespawndelay "0" // Time delay for first respawn before the game.
|
||||
set scr_sab_promode "0"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// CAPTURE THE FLAG GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_ctf_scorelimit "0" // Target score before the round ends.
|
||||
set scr_ctf_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_ctf_numlives "0" // Number of lives per player 0 for unlimited.
|
||||
set scr_ctf_halftime "1" // Half-Time
|
||||
set scr_ctf_roundlimit "1" // How many rounds match would last.
|
||||
set scr_ctf_returntime "30" // How many seconds before flag returns to base without nobody touching it.
|
||||
set scr_ctf_playerrespawndelay "0" // Respawn wait in seconds.
|
||||
set scr_ctf_waverespawndelay "10" // Time delay for first respawn before the game.
|
||||
set scr_ctf_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// ONE FLAG GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_oneflag_scorelimit "1" // Target score before the round ends.
|
||||
set scr_oneflag_timelimit "3" // Duration in minutes for the game to end if the score limit isn't reached.
|
||||
set scr_oneflag_numlives "0" // number of lives per player 0 for unlimited.
|
||||
set scr_oneflag_playerrespawndelay "0" // Respawn wait in seconds.
|
||||
set scr_oneflag_roundlimit "1" // How many rounds match would last.
|
||||
set scr_oneflag_roundswitch "1" // Rounds before the teams switch sides.
|
||||
set scr_oneflag_waverespawndelay "0" // First respawn delay for each round.
|
||||
set scr_oneflag_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// HEADQUARTERS GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_koth_scorelimit "250" // Score limit to win the game.
|
||||
set scr_koth_timelimit "15" // Duration in minutes the game will continue if the score isn't reached.
|
||||
set scr_koth_numlives "0" // Number of lives per game. 0 for unlimited.
|
||||
set scr_koth_playerrespawndelay "0" // Players respawn wait.
|
||||
set scr_koth_roundlimit "1" // Rounds to be played.
|
||||
set scr_koth_roundswitch "1" // Rounds to be played before teams switch sides.
|
||||
set scr_koth_winlimit "1" // rounds per game
|
||||
set scr_koth_waverespawndelay "0" // First respawn delay for each round.
|
||||
set scr_koth_promode "0"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// ARENA GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_arena_scorelimit "1" // Score limit to win the game.
|
||||
set scr_arena_timelimit "2.5" // Duration in minutes the game will continue if the score isn't reached.
|
||||
set scr_arena_numlives "1" // Number of lives per game 0 for unlimited.
|
||||
set scr_arena_roundlimit "0" // Rounds to be played.
|
||||
set scr_arena_roundswitch "3" // Rounds before the teams switch sides.
|
||||
set scr_arena_winlimit "4" // rounds per game
|
||||
set scr_arena_promode "0"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// GLOBAL THERMONUCLEAR WAR GAMETYPE SETTINGS //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
set scr_gtnw_scorelimit "101" // Score limit to win the game.
|
||||
set scr_gtnw_timelimit "10" // Duration in minutes the game will continue if the score isn't reached.
|
||||
set scr_gtnw_numlives "0" // Number of lives per game 0 for unlimited.
|
||||
set scr_gtnw_playerrespawndelay "0" // Players respawn wait.
|
||||
set scr_gtnw_roundlimit "1" // Rounds to be played.
|
||||
set scr_gtnw_roundswitch "0" // Rounds before the teams switch sides.
|
||||
set scr_gtnw_winlimit "1" // rounds per game
|
||||
set scr_gtnw_waverespawndelay "0" // First respawn delay for each round.
|
||||
set scr_gtnw_promode "0"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// MAP SHORT NAMES ROTATION LIST //
|
||||
//////////////////////////////////////////////////
|
||||
// //
|
||||
// mp_afghan - Afghan //
|
||||
// mp_derail - Derail //
|
||||
// mp_estate - Estate //
|
||||
// mp_favela - Favela //
|
||||
// mp_highrise - Highrise //
|
||||
// mp_invasion - Invasion //
|
||||
// mp_checkpoint - Karachi //
|
||||
// mp_quarry - Quarry //
|
||||
// mp_rundown - Rundown //
|
||||
// mp_rust - Rust //
|
||||
// mp_boneyard - Scrapyard //
|
||||
// mp_nightshift - Skidrow //
|
||||
// mp_subbase - Sub Base //
|
||||
// mp_terminal - Terminal //
|
||||
// mp_underpass - Underpass //
|
||||
// mp_brecourt - Wasteland //
|
||||
// //
|
||||
//// DLC1 STIMULUS ///////////////////////////////
|
||||
// //
|
||||
// mp_complex - Bailout //
|
||||
// mp_crash - Crash //
|
||||
// mp_overgrown - Overgrown //
|
||||
// mp_compact - Salvage //
|
||||
// mp_storm - Storm //
|
||||
// //
|
||||
//// DLC2 RESURGENCE /////////////////////////////
|
||||
// //
|
||||
// mp_abandon - Carnival //
|
||||
// mp_fuel2 - Fuel //
|
||||
// mp_strike - Strike //
|
||||
// mp_trailerpark - Trailer Park //
|
||||
// mp_vacant - Vacant //
|
||||
// //
|
||||
//// DLC3 NUKETOWN ///////////////////////////////
|
||||
// //
|
||||
// mp_nuked - Nuketown //
|
||||
// //
|
||||
/// DLC4 CLASSICS 1 //////////////////////////////
|
||||
// //
|
||||
// mp_cross_fire - Crossfire //
|
||||
// mp_bloc - Bloc //
|
||||
// mp_cargoship - Cargoship //
|
||||
// //
|
||||
/// DLC5 CLASSICS 2 //////////////////////////////
|
||||
// //
|
||||
// mp_killhouse - Killhouse //
|
||||
// mp_bog_sh - Bog //
|
||||
// //
|
||||
/// DLC6 FREIGHTER ///////////////////////////////
|
||||
// //
|
||||
// mp_cargoship_sh - Freighter //
|
||||
// //
|
||||
/// DLC7 RESURRECTION ////////////////////////////
|
||||
// //
|
||||
// mp_shipment - Shipment //
|
||||
// mp_shipment_long - Long:Shipment //
|
||||
// mp_rust_long - Long: Rust //
|
||||
// mp_firingrange - Firing Range //
|
||||
// //
|
||||
/// DLC8 RECYCLED ////////////////////////////////
|
||||
// //
|
||||
// mp_storm_spring - Chemical Plant //
|
||||
// mp_fav_tropical - Tropical: Favela //
|
||||
// mp_estate_tropical - Tropical: Estate //
|
||||
// mp_crash_tropical - Tropical: Crash //
|
||||
// mp_bloc_sh - Forgotten City //
|
||||
// //
|
||||
/// DLC9 CLASSICS 3 //////////////////////////////
|
||||
// //
|
||||
// mp_backlot - Backlot //
|
||||
// mp_broadcast - Broadcast //
|
||||
// mp_carentan - Chinatown //
|
||||
// mp_citystreets - District //
|
||||
// mp_convoy - Ambush //
|
||||
// mp_countdown - Countdown //
|
||||
// mp_crash_snow - Winter Crash //
|
||||
// mp_farm - Downpour //
|
||||
// mp_pipeline - Pipeline //
|
||||
// mp_showdown - Showdown //
|
||||
// //
|
||||
/// DLC10 MW3 ////////////////////////////////////
|
||||
// //
|
||||
// mp_dome - Dome //
|
||||
// mp_hardhat - Hardhat //
|
||||
// mp_paris - Resistance //
|
||||
// mp_seatown - Seatown //
|
||||
// mp_bravo - Mission //
|
||||
// mp_underground - Underground //
|
||||
// mp_plaza2 - Arkaden //
|
||||
// mp_village - Village //
|
||||
// mp_alpha - Lockdown //
|
||||
// //
|
||||
/// SP MAPS to MP ////////////////////////////////
|
||||
// //
|
||||
// oilrig - Oilrig //
|
||||
// iw4_credits - Test map //
|
||||
// co_hunted - Village //
|
||||
// //
|
||||
// Example: //
|
||||
// sv_maprotation "map mp_rust map mp_nuked" //
|
||||
// //
|
||||
// Example 24/7 Map: //
|
||||
// sv_maprotation "map mp_highrise" //
|
||||
// //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// GAMETYPE ROTATION LIST (OPTIONAL) //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// List of gametypes you can use on sv_maprotation to mix gametypes. //
|
||||
// or skip this if you plan on hosting 1 gametype only server. //
|
||||
// //
|
||||
// war - Team Deathmatch //
|
||||
// dm - Free-for-all //
|
||||
// dom - Domination //
|
||||
// koth - Headquarters //
|
||||
// sab - Sabotage //
|
||||
// sd - Search and Destroy //
|
||||
// arena - Arena //
|
||||
// dd - Demolition //
|
||||
// ctf - Capture the Flag //
|
||||
// oneflag - One-Flag CTF //
|
||||
// gtnw - Global Thermo-Nuclear War //
|
||||
// //
|
||||
// Example for mix gametype & map rotation: //
|
||||
// sv_maprotation "gametype dm map mp_rust gametype sd map mp_crash" //
|
||||
// //
|
||||
// You can add additional maps to the certain gametype until it reach //
|
||||
// the next gametype command. //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
addGametype war
|
||||
addMap mp_abandon
|
||||
addMap mp_afghan
|
||||
addMap mp_alpha
|
||||
addMap mp_backlot
|
||||
addMap mp_bloc
|
||||
addMap mp_bloc_sh
|
||||
addMap mp_bog_sh
|
||||
addMap mp_boneyard
|
||||
addMap mp_bravo
|
||||
addMap mp_brecourt
|
||||
addMap mp_broadcast
|
||||
addMap mp_carentan
|
||||
addMap mp_cargoship
|
||||
addMap mp_cargoship_sh
|
||||
addMap mp_checkpoint
|
||||
addMap mp_citystreets
|
||||
addMap mp_compact
|
||||
addMap mp_complex
|
||||
addMap mp_convoy
|
||||
addMap mp_countdown
|
||||
addMap mp_crash
|
||||
addMap mp_crash_snow
|
||||
addMap mp_crash_tropical
|
||||
addMap mp_cross_fire
|
||||
addMap mp_derail
|
||||
addMap mp_dome
|
||||
addMap mp_estate
|
||||
addMap mp_estate_tropical
|
||||
addMap mp_farm
|
||||
addMap mp_fav_tropical
|
||||
addMap mp_favela
|
||||
addMap mp_firingrange
|
||||
addMap mp_fuel2
|
||||
addMap mp_hardhat
|
||||
addMap mp_highrise
|
||||
addMap mp_invasion
|
||||
addMap mp_killhouse
|
||||
addMap mp_nightshift
|
||||
addMap mp_nuked
|
||||
addMap mp_overgrown
|
||||
addMap mp_paris
|
||||
addMap mp_pipeline
|
||||
addMap mp_plaza2
|
||||
addMap mp_quarry
|
||||
addMap mp_rundown
|
||||
addMap mp_rust
|
||||
addMap mp_rust_long
|
||||
addMap mp_seatown
|
||||
addMap mp_shipment
|
||||
addMap mp_shipment_long
|
||||
addMap mp_showdown
|
||||
addMap mp_storm
|
||||
addMap mp_storm_spring
|
||||
addMap mp_strike
|
||||
addMap mp_subbase
|
||||
addMap mp_terminal
|
||||
addMap mp_trailerpark
|
||||
addMap mp_underground
|
||||
addMap mp_underpass
|
||||
addMap mp_vacant
|
||||
addMap mp_village
|
2
cfg/fail2ban/filter.d/iw4x.conf
Normal file
2
cfg/fail2ban/filter.d/iw4x.conf
Normal file
@ -0,0 +1,2 @@
|
||||
[Definition]
|
||||
failregex = ^ .* <HOST>$
|
9
cfg/fail2ban/jail.d/iw4x.conf
Normal file
9
cfg/fail2ban/jail.d/iw4x.conf
Normal file
@ -0,0 +1,9 @@
|
||||
[iw4x]
|
||||
enabled = true
|
||||
filter = iw4x
|
||||
logpath = /var/log/iw4x.log
|
||||
maxretry = 1
|
||||
findtime = 30
|
||||
bantime = 3600
|
||||
protocol = all
|
||||
banaction = iptables-allports
|
1
deps/iw4-open-formats/include/api.hpp
vendored
1
deps/iw4-open-formats/include/api.hpp
vendored
@ -4,6 +4,7 @@
|
||||
#include "iw4_native_asset.hpp"
|
||||
#include <functional>
|
||||
#include <filesystem>
|
||||
#include <unordered_set>
|
||||
|
||||
namespace iw4of
|
||||
{
|
||||
|
@ -39,6 +39,11 @@ namespace iw4of
|
||||
this->assets = assets;
|
||||
}
|
||||
|
||||
bool writes_single_file()
|
||||
{
|
||||
return writes_single_file_internal();
|
||||
}
|
||||
|
||||
std::filesystem::path get_work_path(const native::XAssetHeader& header) const;
|
||||
|
||||
virtual ~asset_interface() {}
|
||||
@ -58,6 +63,11 @@ namespace iw4of
|
||||
return {};
|
||||
};
|
||||
|
||||
virtual bool writes_single_file_internal()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
std::filesystem::path get_work_path(const std::string& asset_name) const;
|
||||
|
||||
std::filesystem::path get_work_path(const std::filesystem::path& file_path) const;
|
||||
|
@ -1114,7 +1114,7 @@ namespace iw4of::interfaces
|
||||
/*typename SourceEncoding*/ rapidjson::UTF8<>,
|
||||
/*typename TargetEncoding*/ rapidjson::UTF8<>,
|
||||
/*typename StackAllocator*/ rapidjson::CrtAllocator,
|
||||
/*unsigned writeFlags*/ rapidjson::kWriteNanAndInfFlag>
|
||||
/*unsigned writeFlags*/ rapidjson::kWriteNanAndInfNullFlag | rapidjson::kWriteNanAndInfFlag>
|
||||
writer(buff);
|
||||
writer.SetFormatOptions(rapidjson::PrettyFormatOptions::kFormatSingleLineArray);
|
||||
output.Accept(writer);
|
||||
|
@ -306,7 +306,13 @@ namespace iw4of::interfaces
|
||||
output.AddMember("elemDefs", elemTable, allocator);
|
||||
|
||||
rapidjson::StringBuffer buff;
|
||||
rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buff);
|
||||
rapidjson::PrettyWriter<
|
||||
/*typename OutputStream */ rapidjson::StringBuffer,
|
||||
/*typename SourceEncoding*/ rapidjson::UTF8<>,
|
||||
/*typename TargetEncoding*/ rapidjson::UTF8<>,
|
||||
/*typename StackAllocator*/ rapidjson::CrtAllocator,
|
||||
/*unsigned writeFlags*/ rapidjson::kWriteNanAndInfNullFlag | rapidjson::kWriteNanAndInfFlag>
|
||||
writer(buff);
|
||||
output.Accept(writer);
|
||||
|
||||
return utils::io::write_file(get_work_path(header).string(), buff.GetString());
|
||||
|
@ -636,11 +636,11 @@ namespace iw4of::interfaces
|
||||
if (clip)
|
||||
{
|
||||
assert(clip->planeCount == asset->planeCount);
|
||||
for (size_t i = 0; i < clip->planeCount; i++)
|
||||
{
|
||||
assert(0 ==
|
||||
memcmp(&clip->planes[i], &asset->dpvsPlanes.planes[i], sizeof(native::cplane_s) - sizeof(native::cplane_s::pad)));
|
||||
}
|
||||
//for (size_t i = 0; i < clip->planeCount; i++)
|
||||
//{
|
||||
// assert(0 ==
|
||||
// memcmp(&clip->planes[i], &asset->dpvsPlanes.planes[i], sizeof(native::cplane_s) - sizeof(native::cplane_s::pad)));
|
||||
//}
|
||||
|
||||
asset->dpvsPlanes.planes = clip->planes;
|
||||
}
|
||||
|
@ -209,8 +209,17 @@ namespace iw4of::interfaces
|
||||
output.AddMember("stateBitsTable", statebits_to_json_array(asset->stateBitsTable, asset->stateBitsCount, allocator), allocator);
|
||||
}
|
||||
|
||||
// Write to disk
|
||||
rapidjson::StringBuffer buff;
|
||||
rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buff);
|
||||
rapidjson::PrettyWriter<
|
||||
/*typename OutputStream */ rapidjson::StringBuffer,
|
||||
/*typename SourceEncoding*/ rapidjson::UTF8<>,
|
||||
/*typename TargetEncoding*/ rapidjson::UTF8<>,
|
||||
/*typename StackAllocator*/ rapidjson::CrtAllocator,
|
||||
/*unsigned writeFlags*/ rapidjson::kWriteNanAndInfNullFlag | rapidjson::kWriteNanAndInfFlag>
|
||||
writer(buff);
|
||||
writer.SetFormatOptions(rapidjson::PrettyFormatOptions::kFormatSingleLineArray);
|
||||
|
||||
output.Accept(writer);
|
||||
|
||||
utils::io::write_file(get_work_path(header).string(), buff.GetString());
|
||||
|
125
deps/iw4-open-formats/src/iw4-of/assets/asset_interfaces/iphyscollmap.cpp
vendored
Normal file
125
deps/iw4-open-formats/src/iw4-of/assets/asset_interfaces/iphyscollmap.cpp
vendored
Normal file
@ -0,0 +1,125 @@
|
||||
#include <std_include.hpp>
|
||||
|
||||
#include "assets/assets.hpp"
|
||||
#include "iphyscollmap.hpp"
|
||||
|
||||
#include <utils/io.hpp>
|
||||
#include <utils/string.hpp>
|
||||
|
||||
#include <utils/json.hpp>
|
||||
#include <rapidjson/prettywriter.h>
|
||||
|
||||
#define IW4X_PHYS_COLLMAP_VERSION 1
|
||||
|
||||
namespace iw4of::interfaces
|
||||
{
|
||||
bool iphyscollmap::write_internal(const native::XAssetHeader& header) const
|
||||
{
|
||||
rapidjson::Document output(rapidjson::kObjectType);
|
||||
auto& allocator = output.GetAllocator();
|
||||
|
||||
auto asset = header.physCollmap;
|
||||
assert(asset);
|
||||
|
||||
output.AddMember("version", IW4X_PHYS_COLLMAP_VERSION, allocator);
|
||||
output.AddMember("name", RAPIDJSON_STR(asset->name), allocator);
|
||||
|
||||
rapidjson::Value geoms(rapidjson::kArrayType);
|
||||
for (size_t i = 0; i < asset->count; i++)
|
||||
{
|
||||
rapidjson::Value geom_info(rapidjson::kObjectType);
|
||||
const auto geom = &asset->geoms[i];
|
||||
|
||||
{
|
||||
rapidjson::Value json_brush_wrapper(rapidjson::kObjectType);
|
||||
const auto brush_wrapper = geom->brushWrapper;
|
||||
|
||||
json_brush_wrapper.AddMember("bounds", utils::json::to_json(brush_wrapper->bounds, allocator), allocator);
|
||||
json_brush_wrapper.AddMember("planes", utils::json::to_json(brush_wrapper->planes, brush_wrapper->brush.numsides, allocator), allocator);
|
||||
|
||||
geom_info.AddMember("brushwrapper", json_brush_wrapper, allocator);
|
||||
}
|
||||
|
||||
rapidjson::Value orientation(rapidjson::kArrayType);
|
||||
for (size_t j = 0; j < 3; j++)
|
||||
{
|
||||
orientation.PushBack(utils::json::make_json_array(geom->orientation[j], 3, allocator), allocator);
|
||||
}
|
||||
|
||||
geom_info.AddMember("type", static_cast<int>(geom->type), allocator);
|
||||
geom_info.AddMember("orientation", orientation, allocator);
|
||||
geom_info.AddMember("bounds", utils::json::to_json(geom->bounds, allocator), allocator);
|
||||
}
|
||||
|
||||
rapidjson::StringBuffer buff;
|
||||
rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buff);
|
||||
output.Accept(writer);
|
||||
|
||||
const auto& dump = buff.GetString();
|
||||
|
||||
return utils::io::write_file(get_work_path(header).string(), dump);
|
||||
}
|
||||
|
||||
void* iphyscollmap::read_internal(const std::string& name) const
|
||||
{
|
||||
const auto& path = get_work_path(name).string();
|
||||
|
||||
if (utils::io::file_exists(path))
|
||||
{
|
||||
auto asset = local_allocator.allocate<native::PhysPreset>();
|
||||
rapidjson::Document physPresetJson;
|
||||
|
||||
try
|
||||
{
|
||||
const auto& content = utils::io::read_file(path);
|
||||
physPresetJson.Parse(content.data());
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
print_error("Invalid JSON for physpreset {}! {}", name, e.what());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Must NOT be null!
|
||||
assert(!physPresetJson["sndAliasPrefix"].IsNull());
|
||||
|
||||
asset->name = local_allocator.duplicate_string(physPresetJson["name"].GetString());
|
||||
asset->type = physPresetJson["type"].Get<int32_t>();
|
||||
asset->bounce = physPresetJson["bounce"].Get<float>();
|
||||
asset->mass = physPresetJson["mass"].Get<float>();
|
||||
asset->friction = physPresetJson["friction"].Get<float>();
|
||||
asset->bulletForceScale = physPresetJson["bulletForceScale"].Get<float>();
|
||||
asset->explosiveForceScale = physPresetJson["explosiveForceScale"].Get<float>();
|
||||
asset->sndAliasPrefix = local_allocator.duplicate_string(physPresetJson["sndAliasPrefix"].GetString());
|
||||
asset->piecesSpreadFraction = physPresetJson["piecesSpreadFraction"].Get<float>();
|
||||
asset->piecesUpwardVelocity = physPresetJson["piecesUpwardVelocity"].Get<float>();
|
||||
asset->tempDefaultToCylinder = physPresetJson["tempDefaultToCylinder"].Get<bool>();
|
||||
asset->perSurfaceSndAlias = physPresetJson["perSurfaceSndAlias"].Get<bool>();
|
||||
|
||||
assert(asset->mass > FLT_EPSILON);
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
print_error("Malformed JSON for physpreset {}! {}", name, e.what());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return asset;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::filesystem::path iphyscollmap::get_file_name(const std::string& basename) const
|
||||
{
|
||||
return std::format("{}.iw4x.json", basename);
|
||||
}
|
||||
|
||||
std::filesystem::path iphyscollmap::get_folder_name() const
|
||||
{
|
||||
return "physcollmap";
|
||||
}
|
||||
|
||||
} // namespace iw4of::interfaces
|
30
deps/iw4-open-formats/src/iw4-of/assets/asset_interfaces/iphyscollmap.hpp
vendored
Normal file
30
deps/iw4-open-formats/src/iw4-of/assets/asset_interfaces/iphyscollmap.hpp
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <utils/stream.hpp>
|
||||
#include "assets/asset_interface.hpp"
|
||||
|
||||
namespace iw4of::interfaces
|
||||
{
|
||||
struct iphyscollmap : asset_interface
|
||||
{
|
||||
public:
|
||||
iphyscollmap(const iw4of::assets* assets)
|
||||
: asset_interface(assets)
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
bool write_internal(const native::XAssetHeader& header) const override;
|
||||
void* read_internal(const std::string& name) const override;
|
||||
std::filesystem::path get_file_name(const std::string& basename) const override;
|
||||
std::filesystem::path get_folder_name() const override;
|
||||
|
||||
private:
|
||||
void write(const native::XSurfaceCollisionTree* entry, utils::stream* buffer) const;
|
||||
void write(const native::XSurface* surf, utils::stream* buffer) const;
|
||||
void write(const native::XModelSurfs* asset, utils::stream* buffer) const;
|
||||
void read(native::XSurfaceCollisionTree* entry, utils::stream::reader* reader) const;
|
||||
void read(native::XSurface* asset, utils::stream::reader* reader) const;
|
||||
void read(native::XModelSurfs* asset, utils::stream::reader* reader) const;
|
||||
};
|
||||
} // namespace iw4of::interfaces
|
@ -222,6 +222,7 @@ namespace iw4of::interfaces
|
||||
}
|
||||
else
|
||||
{
|
||||
print_error("Could not find animtree {}\n", animtree_name);
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
|
@ -427,8 +427,16 @@ namespace iw4of::interfaces
|
||||
output.AddMember("count", ents->count, allocator);
|
||||
output.AddMember("head", head, allocator);
|
||||
|
||||
// Write to disk
|
||||
rapidjson::StringBuffer buff;
|
||||
rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buff);
|
||||
rapidjson::PrettyWriter<
|
||||
/*typename OutputStream */ rapidjson::StringBuffer,
|
||||
/*typename SourceEncoding*/ rapidjson::UTF8<>,
|
||||
/*typename TargetEncoding*/ rapidjson::UTF8<>,
|
||||
/*typename StackAllocator*/ rapidjson::CrtAllocator,
|
||||
/*unsigned writeFlags*/ rapidjson::kWriteNanAndInfFlag>
|
||||
writer(buff);
|
||||
writer.SetFormatOptions(rapidjson::PrettyFormatOptions::kFormatSingleLineArray);
|
||||
output.Accept(writer);
|
||||
|
||||
const auto& dump = buff.GetString();
|
||||
|
@ -90,8 +90,15 @@ namespace iw4of::interfaces
|
||||
|
||||
output.AddMember("knots", knots_array, allocator);
|
||||
|
||||
// Write to disk
|
||||
rapidjson::StringBuffer buff;
|
||||
rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buff);
|
||||
rapidjson::PrettyWriter<
|
||||
/*typename OutputStream */ rapidjson::StringBuffer,
|
||||
/*typename SourceEncoding*/ rapidjson::UTF8<>,
|
||||
/*typename TargetEncoding*/ rapidjson::UTF8<>,
|
||||
/*typename StackAllocator*/ rapidjson::CrtAllocator,
|
||||
/*unsigned writeFlags*/ rapidjson::kWriteNanAndInfFlag>
|
||||
writer(buff);
|
||||
writer.SetFormatOptions(rapidjson::PrettyFormatOptions::kFormatSingleLineArray);
|
||||
|
||||
output.Accept(writer);
|
||||
|
@ -114,7 +114,7 @@ namespace iw4of::interfaces
|
||||
/*typename SourceEncoding*/ rapidjson::UTF8<>,
|
||||
/*typename TargetEncoding*/ rapidjson::UTF8<>,
|
||||
/*typename StackAllocator*/ rapidjson::CrtAllocator,
|
||||
/*unsigned writeFlags*/ rapidjson::kWriteNanAndInfFlag
|
||||
/*unsigned writeFlags*/ rapidjson::kWriteNanAndInfNullFlag | rapidjson::kWriteNanAndInfFlag
|
||||
>
|
||||
writer(buff);
|
||||
|
||||
@ -461,7 +461,7 @@ namespace iw4of::interfaces
|
||||
/*typename SourceEncoding*/ rapidjson::UTF8<>,
|
||||
/*typename TargetEncoding*/ rapidjson::UTF8<>,
|
||||
/*typename StackAllocator*/ rapidjson::CrtAllocator,
|
||||
/*unsigned writeFlags*/ rapidjson::kWriteNanAndInfFlag
|
||||
/*unsigned writeFlags*/ rapidjson::kWriteNanAndInfNullFlag
|
||||
>
|
||||
writer(buff);
|
||||
|
||||
|
@ -24,7 +24,16 @@ namespace iw4of
|
||||
if (check_type_is_supported(iw4_int_type))
|
||||
{
|
||||
const auto& path = asset_interfaces[iw4_int_type]->get_work_path({header});
|
||||
if (can_write(path))
|
||||
const bool writes_in_single_file = asset_interfaces[iw4_int_type]->writes_single_file();
|
||||
|
||||
if (writes_in_single_file && !written_assets.contains(path.string()))
|
||||
{
|
||||
// We have never written this file but it exists on disk, so we destroy it because
|
||||
// we will be appending to it in the future
|
||||
std::filesystem::remove(path);
|
||||
}
|
||||
|
||||
if (writes_in_single_file || can_write(path))
|
||||
{
|
||||
bool written = asset_interfaces[iw4_int_type]->write<T>(header);
|
||||
|
||||
|
14
deps/libtommath/.github/workflows/main.yml
vendored
14
deps/libtommath/.github/workflows/main.yml
vendored
@ -29,7 +29,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
container: texlive/texlive:latest-full
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: generate PDF
|
||||
run: |
|
||||
make docs V=1
|
||||
@ -70,6 +70,12 @@ jobs:
|
||||
# RSA superclass with tests (no sanitizer, but debug info)
|
||||
- { BUILDOPTIONS: '--with-cc=gcc --with-m64 --cflags=-DLTM_NOTHING --cflags=-DSC_RSA_1_WITH_TESTS --limit-valgrind', SANITIZER: '', COMPILE_DEBUG: '1', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: '' }
|
||||
|
||||
# Build with small stack-size
|
||||
- { BUILDOPTIONS: '--with-cc=gcc --with-m32 --with-m64 --cflags=-DMP_SMALL_STACK_SIZE', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'gcc-multilib' }
|
||||
- { BUILDOPTIONS: '--with-cc=clang-10 --with-m32 --with-m64 --cflags=-DMP_SMALL_STACK_SIZE --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-10 llvm-10 libc6-dev-i386 gcc-multilib' }
|
||||
- { BUILDOPTIONS: '--with-cc=gcc --with-m32 --with-m64 --cflags=-DMP_SMALL_STACK_SIZE --multithread --limit-valgrind', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'libc6-dev-i386 gcc-multilib' }
|
||||
- { BUILDOPTIONS: '--with-cc=clang-10 --with-m32 --with-m64 --cflags=-DMP_SMALL_STACK_SIZE --multithread', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-10 llvm-10 gcc-multilib' }
|
||||
|
||||
# Test "autotuning", the automatic evaluation and setting of the Toom-Cook cut-offs.
|
||||
#- env: SANITIZER=1 BUILDOPTIONS='--with-cc=gcc-5 --cflags=-DMP_16BIT --limit-valgrind --make-option=tune'
|
||||
#- env: SANITIZER=1 BUILDOPTIONS='--with-cc=gcc-5 --cflags=-DMP_32BIT --limit-valgrind --make-option=tune'
|
||||
@ -129,7 +135,7 @@ jobs:
|
||||
- { BUILDOPTIONS: '--with-cc=clang --cflags=-DMP_16BIT --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang llvm' }
|
||||
- { BUILDOPTIONS: '--with-cc=clang --cflags=-DMP_32BIT --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang llvm' }
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: install dependencies
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
@ -172,7 +178,7 @@ jobs:
|
||||
amalgam:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: install dependencies
|
||||
run: |
|
||||
make amalgamated_timing
|
||||
@ -190,7 +196,7 @@ jobs:
|
||||
# Shared library build
|
||||
- { CMAKEOPTIONS: '-DBUILD_SHARED_LIBS=On' }
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: install dependencies
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
|
15
deps/libtommath/.gitignore
vendored
15
deps/libtommath/.gitignore
vendored
@ -29,6 +29,17 @@ mtest.exe
|
||||
mtest_opponent
|
||||
mtest_opponent.exe
|
||||
|
||||
2kprime
|
||||
2kprime.exe
|
||||
drprime
|
||||
drprime.exe
|
||||
mersenne
|
||||
mersenne.exe
|
||||
mont
|
||||
mont.exe
|
||||
pprime
|
||||
pprime.exe
|
||||
|
||||
# ignore eclipse project files
|
||||
.cproject
|
||||
.project
|
||||
@ -66,9 +77,11 @@ perf.data.old
|
||||
# ignore tommath_amalgam.c generated by make
|
||||
tommath_amalgam.c
|
||||
|
||||
# ignore file generated by make tune
|
||||
# ignore file generated by make 'tune and friends'
|
||||
tuning_list
|
||||
etc/tune
|
||||
2kprime.1
|
||||
drprimes.txt
|
||||
|
||||
# ignore stuff generated by "make manual" and "make poster"
|
||||
*.aux
|
||||
|
8
deps/libtommath/CMakeLists.txt
vendored
8
deps/libtommath/CMakeLists.txt
vendored
@ -7,7 +7,7 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(libtommath
|
||||
VERSION 1.2.0
|
||||
VERSION 1.3.0
|
||||
DESCRIPTION "A free open source portable number theoretic multiple-precision integer (MPI) library written entirely in C."
|
||||
HOMEPAGE_URL "https://www.libtom.net/LibTomMath"
|
||||
LANGUAGES C)
|
||||
@ -28,7 +28,9 @@ option(BUILD_TESTING "" OFF)
|
||||
include(CTest)
|
||||
include(sources.cmake)
|
||||
|
||||
# The only direct cmake argument for now
|
||||
#-----------------------------------------------------------------------------
|
||||
# Options
|
||||
#-----------------------------------------------------------------------------
|
||||
option(BUILD_SHARED_LIBS "Build shared library and only the shared library if \"ON\", default is static" OFF)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -122,7 +124,7 @@ if(COMPILE_LTO)
|
||||
if(COMPILER_SUPPORTS_LTO)
|
||||
set_property(TARGET ${PROJECT_NAME} PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
else()
|
||||
message(SEND_ERROR "This compiler does not support LTO. Reconfigure ${PROJECT_NAME} with -DCOMPILE_LTO=OFF.")
|
||||
message(FATAL_ERROR "This compiler does not support LTO. Reconfigure ${PROJECT_NAME} with -DCOMPILE_LTO=OFF.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
10
deps/libtommath/README.md
vendored
10
deps/libtommath/README.md
vendored
@ -30,8 +30,14 @@ Use those packages with caution and at your own discretion.
|
||||
|
||||
The `develop` branch contains the in-development version. Stable releases are tagged.
|
||||
|
||||
Documentation is built from the LaTeX file `bn.tex`. There is also limited documentation in `tommath.h`.
|
||||
There is also a document, `tommath.pdf`, which describes the goals of the project and many of the algorithms used.
|
||||
Documentation is built from the LaTeX file `doc/bn.tex` and available as PDF for each release.
|
||||
This PDF is also created as build artifact on each CI run.
|
||||
|
||||
There is also limited documentation in `tommath.h`.
|
||||
|
||||
Originally the library contained a document, `tommath.pdf`, which describes the goals of the project and many of the algorithms used at the time.
|
||||
This document has been removed since it can't be built anymore and nobody spent the time to fix and update it.
|
||||
The latest valid update to that document was done in version [`0.39`](https://github.com/libtom/libtommath/releases/tag/0.39) of the library and it is contained within that tarball.
|
||||
|
||||
The project can be build by using `make`. Along with the usual `make`, `make clean` and `make install`,
|
||||
there are several other build targets, see the makefile for details.
|
||||
|
10
deps/libtommath/appveyor.yml
vendored
10
deps/libtommath/appveyor.yml
vendored
@ -1,4 +1,4 @@
|
||||
version: 1.2.1-{build}
|
||||
version: 1.3.0-{build}
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
@ -11,6 +11,10 @@ image:
|
||||
- Visual Studio 2019
|
||||
- Visual Studio 2017
|
||||
- Visual Studio 2015
|
||||
environment:
|
||||
matrix:
|
||||
- CFLAGS_VAR: ""
|
||||
CFLAGS_VAR_DLL: "CFLAGS=\"/Ox /MD /DLTM_TEST_DYNAMIC\""
|
||||
build_script:
|
||||
- cmd: >-
|
||||
if "Visual Studio 2022"=="%APPVEYOR_BUILD_WORKER_IMAGE%" call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||
@ -18,9 +22,9 @@ build_script:
|
||||
if "Visual Studio 2017"=="%APPVEYOR_BUILD_WORKER_IMAGE%" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||
if "Visual Studio 2015"=="%APPVEYOR_BUILD_WORKER_IMAGE%" call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
|
||||
if "Visual Studio 2015"=="%APPVEYOR_BUILD_WORKER_IMAGE%" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
|
||||
nmake -f makefile.msvc test.exe
|
||||
nmake -f makefile.msvc test.exe %CFLAGS_VAR%
|
||||
nmake -f makefile.msvc clean-obj
|
||||
nmake -f makefile.msvc test_dll.exe CFLAGS="/Ox /MD /DLTM_TEST_DYNAMIC"
|
||||
nmake -f makefile.msvc test_dll.exe %CFLAGS_VAR_DLL%
|
||||
test_script:
|
||||
- cmd: test.exe
|
||||
- cmd: test_dll.exe
|
||||
|
6
deps/libtommath/changes.txt
vendored
6
deps/libtommath/changes.txt
vendored
@ -1,3 +1,9 @@
|
||||
Mar 27th, 2024
|
||||
v1.3.0
|
||||
-- Deprecate more APIs which are replaced in develop (PR #572)
|
||||
-- Add support for CMake (PR #573)
|
||||
-- Add support for GitHub Actions (PR #573)
|
||||
|
||||
Sep 04th, 2023
|
||||
v1.2.1
|
||||
-- Bugfix release because of potential integer overflow
|
||||
|
151
deps/libtommath/demo/test.c
vendored
151
deps/libtommath/demo/test.c
vendored
@ -1229,11 +1229,20 @@ LBL_ERR:
|
||||
static int test_mp_reduce_2k(void)
|
||||
{
|
||||
int ix, cnt;
|
||||
bool is2k;
|
||||
|
||||
mp_int a, b, c, d;
|
||||
DOR(mp_init_multi(&a, &b, &c, &d, NULL));
|
||||
|
||||
/* test mp_reduce_2k */
|
||||
|
||||
/* Algorithm as implemented does not work if the least significant digit is zero */
|
||||
DO(mp_2expt(&a, 100));
|
||||
DO(mp_sub_d(&a, 1, &a));
|
||||
DO(mp_sub_d(&a, MP_MASK, &a));
|
||||
is2k = mp_reduce_is_2k(&a);
|
||||
EXPECT(!is2k);
|
||||
|
||||
for (cnt = 3; cnt <= 128; ++cnt) {
|
||||
mp_digit tmp;
|
||||
|
||||
@ -2446,12 +2455,101 @@ LBL_ERR:
|
||||
#define ONLY_PUBLIC_API_C
|
||||
#endif
|
||||
|
||||
#if !defined(LTM_TEST_MULTITHREAD)
|
||||
#define SINGLE_THREADED_C
|
||||
typedef uintptr_t thread_id_t;
|
||||
#else
|
||||
#define MULTI_THREADED_C
|
||||
#if !defined(_WIN32)
|
||||
#define MULTI_THREADED_PTHREAD_C
|
||||
#include <pthread.h>
|
||||
typedef pthread_t thread_id_t;
|
||||
#else
|
||||
#define MULTI_THREADED_MSVC_C
|
||||
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#endif
|
||||
#ifndef WINVER
|
||||
#define WINVER 0x0501
|
||||
#endif
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
typedef HANDLE thread_id_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(MULTI_THREADED_PTHREAD_C)
|
||||
extern int pthread_create(thread_id_t *, const void *, void *(*)(void *), void *);
|
||||
extern int pthread_join(thread_id_t, void **);
|
||||
#endif
|
||||
|
||||
#if !defined(MULTI_THREADED_MSVC_C)
|
||||
extern thread_id_t CreateThread(void *, size_t, unsigned long (*)(void *), void *, unsigned long, void *);
|
||||
extern unsigned long WaitForSingleObject(thread_id_t hHandle, unsigned long dwMilliseconds);
|
||||
#define INFINITE ((unsigned long)-1)
|
||||
#endif
|
||||
|
||||
struct test_fn {
|
||||
const char *name;
|
||||
int (*fn)(void);
|
||||
};
|
||||
|
||||
struct thread_info {
|
||||
thread_id_t thread_id;
|
||||
const struct test_fn *t;
|
||||
int ret;
|
||||
};
|
||||
|
||||
static void run(struct thread_info *tinfo)
|
||||
{
|
||||
tinfo->ret = tinfo->t->fn();
|
||||
|
||||
if (mp_warray_free() == -2)
|
||||
tinfo->ret = EXIT_FAILURE;
|
||||
}
|
||||
|
||||
static void *run_pthread(void *arg)
|
||||
{
|
||||
run(arg);
|
||||
|
||||
return arg;
|
||||
}
|
||||
|
||||
static unsigned long run_msvc(void *arg)
|
||||
{
|
||||
run(arg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int thread_start(struct thread_info *info)
|
||||
{
|
||||
if (MP_HAS(MULTI_THREADED_PTHREAD))
|
||||
return pthread_create(&info->thread_id, NULL, run_pthread, info);
|
||||
if (MP_HAS(MULTI_THREADED_MSVC)) {
|
||||
info->thread_id = CreateThread(NULL, 0, run_msvc, info, 0, NULL);
|
||||
return info->thread_id == (thread_id_t)NULL ? -1 : 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int thread_join(struct thread_info *info, struct thread_info **res)
|
||||
{
|
||||
if (MP_HAS(MULTI_THREADED_PTHREAD))
|
||||
return pthread_join(info->thread_id, (void **)res);
|
||||
if (MP_HAS(MULTI_THREADED_MSVC)) {
|
||||
WaitForSingleObject(info->thread_id, INFINITE);
|
||||
*res = info;
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int unit_tests(int argc, char **argv)
|
||||
{
|
||||
static const struct {
|
||||
const char *name;
|
||||
int (*fn)(void);
|
||||
} test[] = {
|
||||
static const struct test_fn test[] = {
|
||||
#define T0(n) { #n, test_##n }
|
||||
#define T1(n, o) { #n, MP_HAS(o) ? test_##n : NULL }
|
||||
#define T2(n, o1, o2) { #n, (MP_HAS(o1) && MP_HAS(o2)) ? test_##n : NULL }
|
||||
@ -2513,10 +2611,10 @@ static int unit_tests(int argc, char **argv)
|
||||
#undef T2
|
||||
#undef T1
|
||||
};
|
||||
struct thread_info test_threads[sizeof(test)/sizeof(test[0])], *res;
|
||||
unsigned long i, ok, fail, nop;
|
||||
uint64_t t;
|
||||
int j;
|
||||
|
||||
ok = fail = nop = 0;
|
||||
|
||||
t = (uint64_t)time(NULL);
|
||||
@ -2524,20 +2622,43 @@ static int unit_tests(int argc, char **argv)
|
||||
s_mp_rand_jenkins_init(t);
|
||||
mp_rand_source(s_mp_rand_jenkins);
|
||||
|
||||
if (MP_HAS(MP_SMALL_STACK_SIZE)) {
|
||||
printf("Small-stack enabled\n\n");
|
||||
}
|
||||
|
||||
if (MP_HAS(MULTI_THREADED)) {
|
||||
printf("Multi-threading enabled\n\n");
|
||||
/* we ignore the fact that jenkins is not thread safe */
|
||||
for (i = 0; i < (sizeof(test) / sizeof(test[0])); ++i) {
|
||||
test_threads[i].t = &test[i];
|
||||
EXPECT(thread_start(&test_threads[i]) == 0);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < (sizeof(test) / sizeof(test[0])); ++i) {
|
||||
if (argc > 1) {
|
||||
for (j = 1; j < argc; ++j) {
|
||||
if (strstr(test[i].name, argv[j]) != NULL) {
|
||||
break;
|
||||
j = -1;
|
||||
if (MP_HAS(SINGLE_THREADED)) {
|
||||
if (argc > 1) {
|
||||
for (j = 1; j < argc; ++j) {
|
||||
if (strstr(test[i].name, argv[j]) != NULL) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (j == argc) continue;
|
||||
}
|
||||
if (j == argc) continue;
|
||||
|
||||
if (test[i].fn)
|
||||
j = test[i].fn();
|
||||
} else if (MP_HAS(MULTI_THREADED)) {
|
||||
EXPECT(thread_join(&test_threads[i], &res) == 0);
|
||||
j = res->ret;
|
||||
}
|
||||
printf("TEST %s\n", test[i].name);
|
||||
|
||||
if (test[i].fn == NULL) {
|
||||
nop++;
|
||||
printf("NOP %s\n\n", test[i].name);
|
||||
} else if (test[i].fn() == EXIT_SUCCESS) {
|
||||
} else if (j == EXIT_SUCCESS) {
|
||||
ok++;
|
||||
printf("\n");
|
||||
} else {
|
||||
@ -2547,8 +2668,12 @@ static int unit_tests(int argc, char **argv)
|
||||
}
|
||||
fprintf(fail?stderr:stdout, "Tests OK/NOP/FAIL: %lu/%lu/%lu\n", ok, nop, fail);
|
||||
|
||||
if (fail != 0) return EXIT_FAILURE;
|
||||
else return EXIT_SUCCESS;
|
||||
EXPECT(mp_warray_free() != -2);
|
||||
|
||||
if (fail == 0)
|
||||
return EXIT_SUCCESS;
|
||||
LBL_ERR:
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
49
deps/libtommath/doc/bn.tex
vendored
49
deps/libtommath/doc/bn.tex
vendored
@ -51,7 +51,7 @@
|
||||
\begin{document}
|
||||
\frontmatter
|
||||
\pagestyle{empty}
|
||||
\title{LibTomMath User Manual \\ v1.2.1}
|
||||
\title{LibTomMath User Manual \\ v1.3.0}
|
||||
\author{LibTom Projects \\ www.libtom.net}
|
||||
\maketitle
|
||||
This text, the library and the accompanying textbook are all hereby placed in the public domain.
|
||||
@ -352,6 +352,16 @@ which means they are to be defined only if \texttt{LTM\_LAST} has been defined.
|
||||
\end{center}
|
||||
\end{small}
|
||||
|
||||
\subsection{Small-Stack option}
|
||||
\label{ch:SMALL_STACK_INTRO}
|
||||
The library can be compiled with the symbol \texttt{MP\_SMALL\_STACK\_SIZE} defined, which results in
|
||||
the temporary \texttt{MP\_WARRAY}-sized stack buffers being put on the heap.
|
||||
This comes with one problem, namely: formerly promised thread-safety isn't given anymore.
|
||||
Therefore if the Small-Stack option is enabled while doing multi threading, one shall always initialize
|
||||
the library by calling \texttt{mp\_warray\_init()} once with the correct number of threads.
|
||||
|
||||
C.f. \ref{ch:SMALL_STACK_API} for the API description and further details.
|
||||
|
||||
\section{Purpose of LibTomMath}
|
||||
Unlike GNU MP (GMP) Library, LIP, OpenSSL or various other commercial kits (Miracl), LibTomMath
|
||||
was not written with bleeding edge performance in mind. First and foremost LibTomMath was written
|
||||
@ -428,7 +438,11 @@ environments. Fast RSA for example can be performed with as little as 8 Kibibyt
|
||||
\section{Building Programs}
|
||||
In order to use LibTomMath you must include ``tommath.h'' and link against the appropriate library
|
||||
file (typically
|
||||
libtommath.a). There is no library initialization required and the entire library is thread safe.
|
||||
libtommath.a). There is no library initialization required and the entire library is thread safe
|
||||
if it is used in its default configuration. The small-stack option makes use of atomic operations
|
||||
to maintain its internal state and therefore does not require locking, but it MUST be initialized
|
||||
if used from multiple threads. For further information see \ref{ch:SMALL_STACK_INTRO} resp.
|
||||
\ref{ch:SMALL_STACK_API}.
|
||||
|
||||
\section{Return Codes}
|
||||
There are five possible return codes a function may return.
|
||||
@ -813,6 +827,37 @@ int main(void)
|
||||
\end{alltt}
|
||||
\end{small}
|
||||
|
||||
\section{Small-Stack option}
|
||||
\label{ch:SMALL_STACK_API}
|
||||
|
||||
In case the \texttt{MP\_SMALL\_STACK\_SIZE} symbol is defined the following functions
|
||||
can be useful.
|
||||
|
||||
To initialize the internal structure the following function shall be called.
|
||||
|
||||
\index{mp\_warray\_init}
|
||||
\begin{alltt}
|
||||
mp_err mp_warray_init(size_t n_alloc, bool preallocate);
|
||||
\end{alltt}
|
||||
|
||||
The flag \texttt{preallocate} controls whether the internal buffers --
|
||||
\texttt{n\_alloc} buffers of size \texttt{MP\_WARRAY} -- will be allocated when
|
||||
\texttt{mp\_warray\_init()} is called, or whether they will be allocated when required.
|
||||
|
||||
To free the internally allocated memory the following function shall be called.
|
||||
|
||||
\index{mp\_warray\_free}
|
||||
\begin{alltt}
|
||||
int mp_warray_free(void);
|
||||
\end{alltt}
|
||||
|
||||
|
||||
Those two API functions are always available, even if the \texttt{MP\_SMALL\_STACK\_SIZE} option
|
||||
has been disabled at compile time.
|
||||
In that case \texttt{mp\_warray\_init()} will return \texttt{MP\_ERR} and \texttt{mp\_warray\_free()}
|
||||
will return $-1$.
|
||||
|
||||
|
||||
\chapter{Basic Operations}
|
||||
\section{Copying}
|
||||
|
||||
|
2
deps/libtommath/etc/2kprime.1
vendored
2
deps/libtommath/etc/2kprime.1
vendored
@ -1,2 +0,0 @@
|
||||
256-bits (k = 36113) = 115792089237316195423570985008687907853269984665640564039457584007913129603823
|
||||
512-bits (k = 38117) = 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006045979
|
23
deps/libtommath/etc/2kprime.c
vendored
23
deps/libtommath/etc/2kprime.c
vendored
@ -10,23 +10,24 @@ int main(void)
|
||||
size_t x;
|
||||
bool y;
|
||||
mp_int q, p;
|
||||
mp_err err;
|
||||
FILE *out;
|
||||
clock_t t1;
|
||||
mp_digit z;
|
||||
|
||||
mp_init_multi(&q, &p, NULL);
|
||||
if ((err = mp_init_multi(&q, &p, NULL)) != MP_OKAY) goto LTM_ERR;
|
||||
|
||||
out = fopen("2kprime.1", "w");
|
||||
if (out != NULL) {
|
||||
for (x = 0; x < (sizeof(sizes) / sizeof(sizes[0])); x++) {
|
||||
top:
|
||||
mp_2expt(&q, sizes[x]);
|
||||
mp_add_d(&q, 3uL, &q);
|
||||
if ((err = mp_2expt(&q, sizes[x])) != MP_OKAY) goto LTM_ERR;
|
||||
if ((err = mp_add_d(&q, 3uL, &q)) != MP_OKAY) goto LTM_ERR;
|
||||
z = -3;
|
||||
|
||||
t1 = clock();
|
||||
for (;;) {
|
||||
mp_sub_d(&q, 4uL, &q);
|
||||
if ((err = mp_sub_d(&q, 4uL, &q)) != MP_OKAY) goto LTM_ERR;
|
||||
z += 4uL;
|
||||
|
||||
if (z > MP_MASK) {
|
||||
@ -42,21 +43,21 @@ top:
|
||||
}
|
||||
|
||||
/* quick test on q */
|
||||
mp_prime_is_prime(&q, 1, &y);
|
||||
if ((err = mp_prime_is_prime(&q, 1, &y)) != MP_OKAY) goto LTM_ERR;
|
||||
if (!y) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* find (q-1)/2 */
|
||||
mp_sub_d(&q, 1uL, &p);
|
||||
mp_div_2(&p, &p);
|
||||
mp_prime_is_prime(&p, 3, &y);
|
||||
if ((err = mp_sub_d(&q, 1uL, &p)) != MP_OKAY) goto LTM_ERR;
|
||||
if ((err = mp_div_2(&p, &p)) != MP_OKAY) goto LTM_ERR;
|
||||
if ((err = mp_prime_is_prime(&p, 3, &y)) != MP_OKAY) goto LTM_ERR;
|
||||
if (!y) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* test on q */
|
||||
mp_prime_is_prime(&q, 3, &y);
|
||||
if ((err = mp_prime_is_prime(&q, 3, &y)) != MP_OKAY) goto LTM_ERR;
|
||||
if (!y) {
|
||||
continue;
|
||||
}
|
||||
@ -69,13 +70,13 @@ top:
|
||||
goto top;
|
||||
}
|
||||
|
||||
mp_to_decimal(&q, buf, sizeof(buf));
|
||||
if ((err = mp_to_decimal(&q, buf, sizeof(buf))) != MP_OKAY) goto LTM_ERR;
|
||||
printf("\n\n%d-bits (k = %lu) = %s\n", sizes[x], z, buf);
|
||||
fprintf(out, "%d-bits (k = %lu) = %s\n", sizes[x], z, buf);
|
||||
fflush(out);
|
||||
}
|
||||
fclose(out);
|
||||
}
|
||||
|
||||
LTM_ERR:
|
||||
return 0;
|
||||
}
|
||||
|
20
deps/libtommath/etc/drprime.c
vendored
20
deps/libtommath/etc/drprime.c
vendored
@ -10,16 +10,17 @@ int main(void)
|
||||
char buf[4096];
|
||||
FILE *out;
|
||||
mp_int a, b;
|
||||
mp_err err;
|
||||
|
||||
mp_init(&a);
|
||||
mp_init(&b);
|
||||
if ((err = mp_init(&a)) != MP_OKAY) goto LTM_ERR;
|
||||
if ((err = mp_init(&b)) != MP_OKAY) goto LTM_ERR;
|
||||
|
||||
out = fopen("drprimes.txt", "w");
|
||||
if (out != NULL) {
|
||||
for (x = 0; x < (int)(sizeof(sizes)/sizeof(sizes[0])); x++) {
|
||||
top:
|
||||
printf("Seeking a %d-bit safe prime\n", sizes[x] * MP_DIGIT_BIT);
|
||||
mp_grow(&a, sizes[x]);
|
||||
if ((err = mp_grow(&a, sizes[x])) != MP_OKAY) goto LTM_ERR;
|
||||
mp_zero(&a);
|
||||
for (y = 1; y < sizes[x]; y++) {
|
||||
a.dp[y] = MP_MASK;
|
||||
@ -34,15 +35,15 @@ top:
|
||||
for (;;) {
|
||||
a.dp[0] += 4uL;
|
||||
if (a.dp[0] >= MP_MASK) break;
|
||||
mp_prime_is_prime(&a, 1, &res);
|
||||
if ((err = mp_prime_is_prime(&a, 1, &res)) != MP_OKAY) goto LTM_ERR;
|
||||
if (!res) continue;
|
||||
printf(".");
|
||||
fflush(stdout);
|
||||
mp_sub_d(&a, 1uL, &b);
|
||||
mp_div_2(&b, &b);
|
||||
mp_prime_is_prime(&b, 3, &res);
|
||||
if ((err = mp_sub_d(&a, 1uL, &b)) != MP_OKAY) goto LTM_ERR;
|
||||
if ((err = mp_div_2(&b, &b)) != MP_OKAY) goto LTM_ERR;
|
||||
if ((err = mp_prime_is_prime(&b, 3, &res)) != MP_OKAY) goto LTM_ERR;
|
||||
if (!res) continue;
|
||||
mp_prime_is_prime(&a, 3, &res);
|
||||
if ((err = mp_prime_is_prime(&a, 3, &res)) != MP_OKAY) goto LTM_ERR;
|
||||
if (res) break;
|
||||
}
|
||||
|
||||
@ -51,7 +52,7 @@ top:
|
||||
sizes[x] += 1;
|
||||
goto top;
|
||||
} else {
|
||||
mp_to_decimal(&a, buf, sizeof(buf));
|
||||
if ((err = mp_to_decimal(&a, buf, sizeof(buf))) != MP_OKAY) goto LTM_ERR;
|
||||
printf("\n\np == %s\n\n", buf);
|
||||
fprintf(out, "%d-bit prime:\np == %s\n\n", mp_count_bits(&a), buf);
|
||||
fflush(out);
|
||||
@ -60,6 +61,7 @@ top:
|
||||
fclose(out);
|
||||
}
|
||||
|
||||
LTM_ERR:
|
||||
mp_clear(&a);
|
||||
mp_clear(&b);
|
||||
|
||||
|
9
deps/libtommath/etc/drprimes.txt
vendored
9
deps/libtommath/etc/drprimes.txt
vendored
@ -1,9 +0,0 @@
|
||||
300-bit prime:
|
||||
p == 2037035976334486086268445688409378161051468393665936250636140449354381298610415201576637819
|
||||
|
||||
540-bit prime:
|
||||
p == 3599131035634557106248430806148785487095757694641533306480604458089470064537190296255232548883112685719936728506816716098566612844395439751206810991770626477344739
|
||||
|
||||
780-bit prime:
|
||||
p == 6359114106063703798370219984742410466332205126109989319225557147754704702203399726411277962562135973685197744935448875852478791860694279747355800678568677946181447581781401213133886609947027230004277244697462656003655947791725966271167
|
||||
|
2
deps/libtommath/etc/makefile
vendored
2
deps/libtommath/etc/makefile
vendored
@ -6,6 +6,8 @@ LTM_TUNE_CFLAGS = $(CFLAGS) $(LTM_CFLAGS) -Wall -W -Wextra -Wshadow -O3 -I../
|
||||
# libname when you can't install the lib with install
|
||||
LIBNAME=../libtommath.a
|
||||
|
||||
all: pprime tune test_standalone mersenne drprime 2kprime mont
|
||||
|
||||
#provable primes
|
||||
pprime: pprime.o
|
||||
$(CC) $(LTM_TUNE_CFLAGS) pprime.o $(LIBNAME) -o pprime
|
||||
|
4
deps/libtommath/etc/mersenne.c
vendored
4
deps/libtommath/etc/mersenne.c
vendored
@ -57,7 +57,9 @@ static mp_err is_mersenne(long s, bool *pp)
|
||||
|
||||
/* if u == 0 then its prime */
|
||||
if (mp_iszero(&u)) {
|
||||
mp_prime_is_prime(&n, 8, pp);
|
||||
if ((res = mp_prime_is_prime(&n, 8, pp)) != MP_OKAY) {
|
||||
goto LBL_MU;
|
||||
}
|
||||
if (!*pp) printf("FAILURE\n");
|
||||
}
|
||||
|
||||
|
18
deps/libtommath/etc/mont.c
vendored
18
deps/libtommath/etc/mont.c
vendored
@ -7,10 +7,11 @@ int main(void)
|
||||
{
|
||||
mp_int modulus, R, p, pp;
|
||||
mp_digit mp;
|
||||
mp_err err;
|
||||
int x, y;
|
||||
|
||||
srand(time(NULL));
|
||||
mp_init_multi(&modulus, &R, &p, &pp, NULL);
|
||||
if ((err = mp_init_multi(&modulus, &R, &p, &pp, NULL)) != MP_OKAY) goto LTM_ERR;
|
||||
|
||||
/* loop through various sizes */
|
||||
for (x = 4; x < 256; x++) {
|
||||
@ -18,18 +19,20 @@ int main(void)
|
||||
fflush(stdout);
|
||||
|
||||
/* make up the odd modulus */
|
||||
mp_rand(&modulus, x);
|
||||
if ((err = mp_rand(&modulus, x)) != MP_OKAY) goto LTM_ERR;
|
||||
modulus.dp[0] |= 1uL;
|
||||
|
||||
/* now find the R value */
|
||||
mp_montgomery_calc_normalization(&R, &modulus);
|
||||
mp_montgomery_setup(&modulus, &mp);
|
||||
if ((err = mp_montgomery_calc_normalization(&R, &modulus)) != MP_OKAY) goto LTM_ERR;
|
||||
if ((err = mp_montgomery_setup(&modulus, &mp)) != MP_OKAY) goto LTM_ERR;
|
||||
|
||||
/* now run through a bunch tests */
|
||||
for (y = 0; y < 1000; y++) {
|
||||
mp_rand(&p, x/2); /* p = random */
|
||||
mp_mul(&p, &R, &pp); /* pp = R * p */
|
||||
mp_montgomery_reduce(&pp, &modulus, mp);
|
||||
/* p = random */
|
||||
if ((err = mp_rand(&p, x/2)) != MP_OKAY) goto LTM_ERR;
|
||||
/* pp = R * p */
|
||||
if ((err = mp_mul(&p, &R, &pp)) != MP_OKAY) goto LTM_ERR;
|
||||
if ((err = mp_montgomery_reduce(&pp, &modulus, mp)) != MP_OKAY) goto LTM_ERR;
|
||||
|
||||
/* should be equal to p */
|
||||
if (mp_cmp(&pp, &p) != MP_EQ) {
|
||||
@ -40,5 +43,6 @@ int main(void)
|
||||
printf("PASSED\n");
|
||||
}
|
||||
|
||||
LTM_ERR:
|
||||
return 0;
|
||||
}
|
||||
|
424
deps/libtommath/etc/pprime.c
vendored
424
deps/libtommath/etc/pprime.c
vendored
@ -1,179 +1,40 @@
|
||||
/* Generates provable primes
|
||||
*
|
||||
* See http://gmail.com:8080/papers/pp.pdf for more info.
|
||||
/*
|
||||
* Generates provable primes
|
||||
*
|
||||
* Tom St Denis, tomstdenis@gmail.com, http://tom.gmail.com
|
||||
*
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include "tommath_private.h"
|
||||
#include "../tommath_private.h"
|
||||
|
||||
static int n_prime;
|
||||
static FILE *primes;
|
||||
|
||||
/* fast square root */
|
||||
static mp_digit i_sqrt(mp_word x)
|
||||
static void mp_print(const char *s, const mp_int *a, int radix, FILE *stream)
|
||||
{
|
||||
mp_word x1, x2;
|
||||
|
||||
x2 = x;
|
||||
do {
|
||||
x1 = x2;
|
||||
x2 = x1 - ((x1 * x1) - x) / (2u * x1);
|
||||
} while (x1 != x2);
|
||||
|
||||
if ((x1 * x1) > x) {
|
||||
--x1;
|
||||
mp_err err;
|
||||
fputs(s, stream);
|
||||
err = mp_fwrite(a, radix, stream);
|
||||
if (err != MP_OKAY) {
|
||||
fprintf(stderr,"mp_fwrite in mp_print failed. error = %s\n", mp_error_to_string(err));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
return x1;
|
||||
fputc('\n',stream);
|
||||
}
|
||||
|
||||
|
||||
/* generates a prime digit */
|
||||
static void gen_prime(void)
|
||||
static mp_digit prime_digit(int bits)
|
||||
{
|
||||
mp_digit r, x, y, next;
|
||||
FILE *out;
|
||||
mp_digit d = 0;
|
||||
mp_int a;
|
||||
mp_err err;
|
||||
|
||||
out = fopen("pprime.dat", "wb");
|
||||
if (out != NULL) {
|
||||
|
||||
/* write first set of primes */
|
||||
/* *INDENT-OFF* */
|
||||
r = 3uL; fwrite(&r, 1uL, sizeof(mp_digit), out);
|
||||
r = 5uL; fwrite(&r, 1uL, sizeof(mp_digit), out);
|
||||
r = 7uL; fwrite(&r, 1uL, sizeof(mp_digit), out);
|
||||
r = 11uL; fwrite(&r, 1uL, sizeof(mp_digit), out);
|
||||
r = 13uL; fwrite(&r, 1uL, sizeof(mp_digit), out);
|
||||
r = 17uL; fwrite(&r, 1uL, sizeof(mp_digit), out);
|
||||
r = 19uL; fwrite(&r, 1uL, sizeof(mp_digit), out);
|
||||
r = 23uL; fwrite(&r, 1uL, sizeof(mp_digit), out);
|
||||
r = 29uL; fwrite(&r, 1uL, sizeof(mp_digit), out);
|
||||
r = 31uL; fwrite(&r, 1uL, sizeof(mp_digit), out);
|
||||
/* *INDENT-ON* */
|
||||
|
||||
/* get square root, since if 'r' is composite its factors must be < than this */
|
||||
y = i_sqrt(r);
|
||||
next = (y + 1uL) * (y + 1uL);
|
||||
|
||||
for (;;) {
|
||||
do {
|
||||
r += 2uL; /* next candidate */
|
||||
r &= MP_MASK;
|
||||
if (r < 31uL) break;
|
||||
|
||||
/* update sqrt ? */
|
||||
if (next <= r) {
|
||||
++y;
|
||||
next = (y + 1uL) * (y + 1uL);
|
||||
}
|
||||
|
||||
/* loop if divisible by 3,5,7,11,13,17,19,23,29 */
|
||||
if ((r % 3uL) == 0uL) {
|
||||
x = 0uL;
|
||||
continue;
|
||||
}
|
||||
if ((r % 5uL) == 0uL) {
|
||||
x = 0uL;
|
||||
continue;
|
||||
}
|
||||
if ((r % 7uL) == 0uL) {
|
||||
x = 0uL;
|
||||
continue;
|
||||
}
|
||||
if ((r % 11uL) == 0uL) {
|
||||
x = 0uL;
|
||||
continue;
|
||||
}
|
||||
if ((r % 13uL) == 0uL) {
|
||||
x = 0uL;
|
||||
continue;
|
||||
}
|
||||
if ((r % 17uL) == 0uL) {
|
||||
x = 0uL;
|
||||
continue;
|
||||
}
|
||||
if ((r % 19uL) == 0uL) {
|
||||
x = 0uL;
|
||||
continue;
|
||||
}
|
||||
if ((r % 23uL) == 0uL) {
|
||||
x = 0uL;
|
||||
continue;
|
||||
}
|
||||
if ((r % 29uL) == 0uL) {
|
||||
x = 0uL;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* now check if r is divisible by x + k={1,7,11,13,17,19,23,29} */
|
||||
for (x = 30uL; x <= y; x += 30uL) {
|
||||
if ((r % (x + 1uL)) == 0uL) {
|
||||
x = 0uL;
|
||||
break;
|
||||
}
|
||||
if ((r % (x + 7uL)) == 0uL) {
|
||||
x = 0uL;
|
||||
break;
|
||||
}
|
||||
if ((r % (x + 11uL)) == 0uL) {
|
||||
x = 0uL;
|
||||
break;
|
||||
}
|
||||
if ((r % (x + 13uL)) == 0uL) {
|
||||
x = 0uL;
|
||||
break;
|
||||
}
|
||||
if ((r % (x + 17uL)) == 0uL) {
|
||||
x = 0uL;
|
||||
break;
|
||||
}
|
||||
if ((r % (x + 19uL)) == 0uL) {
|
||||
x = 0uL;
|
||||
break;
|
||||
}
|
||||
if ((r % (x + 23uL)) == 0uL) {
|
||||
x = 0uL;
|
||||
break;
|
||||
}
|
||||
if ((r % (x + 29uL)) == 0uL) {
|
||||
x = 0uL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while (x == 0uL);
|
||||
if (r > 31uL) {
|
||||
fwrite(&r, 1uL, sizeof(mp_digit), out);
|
||||
printf("%9lu\r", r);
|
||||
fflush(stdout);
|
||||
}
|
||||
if (r < 31uL) break;
|
||||
}
|
||||
|
||||
fclose(out);
|
||||
if ((err = mp_init(&a)) != MP_OKAY) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void load_tab(void)
|
||||
{
|
||||
primes = fopen("pprime.dat", "rb");
|
||||
if (primes == NULL) {
|
||||
gen_prime();
|
||||
primes = fopen("pprime.dat", "rb");
|
||||
}
|
||||
fseek(primes, 0L, SEEK_END);
|
||||
n_prime = ftell(primes) / sizeof(mp_digit);
|
||||
}
|
||||
if ((err = mp_prime_rand(&a, 1, bits, false)) != MP_OKAY) goto LTM_ERR;
|
||||
d = a.dp[0];
|
||||
|
||||
static mp_digit prime_digit(void)
|
||||
{
|
||||
int n;
|
||||
mp_digit d;
|
||||
|
||||
n = abs(rand()) % n_prime;
|
||||
fseek(primes, n * sizeof(mp_digit), SEEK_SET);
|
||||
fread(&d, 1uL, sizeof(mp_digit), primes);
|
||||
LTM_ERR:
|
||||
mp_clear(&a);
|
||||
return d;
|
||||
}
|
||||
|
||||
@ -182,230 +43,177 @@ static mp_digit prime_digit(void)
|
||||
static mp_err pprime(int k, int li, mp_int *p, mp_int *q)
|
||||
{
|
||||
mp_int a, b, c, n, x, y, z, v;
|
||||
mp_err res;
|
||||
int ii;
|
||||
static const mp_digit bases[] = { 2, 3, 5, 7, 11, 13, 17, 19 };
|
||||
mp_err err = MP_OKAY;
|
||||
int ii, bits;
|
||||
|
||||
/* single digit ? */
|
||||
if (k <= (int) MP_DIGIT_BIT) {
|
||||
mp_set(p, prime_digit());
|
||||
if (k < (int) MP_DIGIT_BIT) {
|
||||
mp_set(p, prime_digit(k));
|
||||
if (mp_iszero(p)) {
|
||||
return MP_VAL;
|
||||
}
|
||||
return MP_OKAY;
|
||||
}
|
||||
|
||||
if ((res = mp_init(&c)) != MP_OKAY) {
|
||||
return res;
|
||||
}
|
||||
|
||||
if ((res = mp_init(&v)) != MP_OKAY) {
|
||||
goto LBL_C;
|
||||
if ((err = mp_init_multi(&a, &b, &c, &n, &x, &y, &z, &v, NULL)) != MP_OKAY) {
|
||||
return err;
|
||||
}
|
||||
|
||||
/* product of first 50 primes */
|
||||
if ((res =
|
||||
mp_read_radix(&v,
|
||||
"19078266889580195013601891820992757757219839668357012055907516904309700014933909014729740190",
|
||||
10)) != MP_OKAY) {
|
||||
goto LBL_V;
|
||||
}
|
||||
|
||||
if ((res = mp_init(&a)) != MP_OKAY) {
|
||||
goto LBL_V;
|
||||
if ((err = mp_read_radix(&v, "9NPvy2By/eZ0N6s68ky5K/8UTD0Q7fInhDK9BHnueH92HfzU4+U", 64)) != MP_OKAY) {
|
||||
goto LTM_ERR;
|
||||
}
|
||||
|
||||
/* set the prime */
|
||||
mp_set(&a, prime_digit());
|
||||
|
||||
if ((res = mp_init(&b)) != MP_OKAY) {
|
||||
goto LBL_A;
|
||||
}
|
||||
|
||||
if ((res = mp_init(&n)) != MP_OKAY) {
|
||||
goto LBL_B;
|
||||
}
|
||||
|
||||
if ((res = mp_init(&x)) != MP_OKAY) {
|
||||
goto LBL_N;
|
||||
}
|
||||
|
||||
if ((res = mp_init(&y)) != MP_OKAY) {
|
||||
goto LBL_X;
|
||||
}
|
||||
|
||||
if ((res = mp_init(&z)) != MP_OKAY) {
|
||||
goto LBL_Y;
|
||||
mp_set(&a, prime_digit(MP_DIGIT_BIT));
|
||||
if (mp_iszero(&a)) {
|
||||
err = MP_VAL;
|
||||
goto LTM_ERR;
|
||||
}
|
||||
|
||||
/* now loop making the single digit */
|
||||
while (mp_count_bits(&a) < k) {
|
||||
fprintf(stderr, "prime has %4d bits left\r", k - mp_count_bits(&a));
|
||||
bits = k - mp_count_bits(&a);
|
||||
fprintf(stderr, "prime has %4d bits left\r", bits);
|
||||
fflush(stderr);
|
||||
top:
|
||||
mp_set(&b, prime_digit());
|
||||
if (bits < MP_DIGIT_BIT) {
|
||||
mp_set(&b, prime_digit(bits));
|
||||
} else {
|
||||
mp_set(&b, prime_digit(MP_DIGIT_BIT));
|
||||
}
|
||||
if (mp_iszero(&b)) {
|
||||
err = MP_VAL;
|
||||
goto LTM_ERR;
|
||||
}
|
||||
|
||||
/* now compute z = a * b * 2 */
|
||||
if ((res = mp_mul(&a, &b, &z)) != MP_OKAY) { /* z = a * b */
|
||||
goto LBL_Z;
|
||||
}
|
||||
|
||||
if ((res = mp_copy(&z, &c)) != MP_OKAY) { /* c = a * b */
|
||||
goto LBL_Z;
|
||||
}
|
||||
|
||||
if ((res = mp_mul_2(&z, &z)) != MP_OKAY) { /* z = 2 * a * b */
|
||||
goto LBL_Z;
|
||||
}
|
||||
|
||||
/* z = a * b */
|
||||
if ((err = mp_mul(&a, &b, &z)) != MP_OKAY) goto LTM_ERR;
|
||||
/* c = a * b */
|
||||
if ((err = mp_copy(&z, &c)) != MP_OKAY) goto LTM_ERR;
|
||||
/* z = 2 * a * b */
|
||||
if ((err = mp_mul_2(&z, &z)) != MP_OKAY) goto LTM_ERR;
|
||||
/* n = z + 1 */
|
||||
if ((res = mp_add_d(&z, 1uL, &n)) != MP_OKAY) { /* n = z + 1 */
|
||||
goto LBL_Z;
|
||||
}
|
||||
if ((err = mp_add_d(&z, 1uL, &n)) != MP_OKAY) goto LTM_ERR;
|
||||
/* check (n, v) == 1; y = (n, v) */
|
||||
if ((err = mp_gcd(&n, &v, &y)) != MP_OKAY) goto LTM_ERR;
|
||||
|
||||
/* check (n, v) == 1 */
|
||||
if ((res = mp_gcd(&n, &v, &y)) != MP_OKAY) { /* y = (n, v) */
|
||||
goto LBL_Z;
|
||||
}
|
||||
|
||||
if (mp_cmp_d(&y, 1uL) != MP_EQ)
|
||||
if (mp_cmp_d(&y, 1uL) != MP_EQ) {
|
||||
goto top;
|
||||
|
||||
}
|
||||
mp_set(&x, 2u);
|
||||
/* now try base x=bases[ii] */
|
||||
for (ii = 0; ii < li; ii++) {
|
||||
mp_set(&x, bases[ii]);
|
||||
if ((err = mp_prime_next_prime(&x, -1, false)) != MP_OKAY) goto LTM_ERR;
|
||||
|
||||
/* compute x^a mod n */
|
||||
if ((res = mp_exptmod(&x, &a, &n, &y)) != MP_OKAY) { /* y = x^a mod n */
|
||||
goto LBL_Z;
|
||||
/* compute x^a mod n; y = x^a mod n */
|
||||
if ((err = mp_exptmod(&x, &a, &n, &y)) != MP_OKAY) goto LTM_ERR;
|
||||
/* if y == 1 loop */
|
||||
if (mp_cmp_d(&y, 1uL) == MP_EQ) {
|
||||
continue;
|
||||
}
|
||||
/* now x^2a mod n ; y = x^2a mod n*/
|
||||
if ((err = mp_sqrmod(&y, &n, &y)) != MP_OKAY) goto LTM_ERR;
|
||||
|
||||
if (mp_cmp_d(&y, 1uL) == MP_EQ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* compute x^b mod n ; y = x^b mod n*/
|
||||
if ((err = mp_exptmod(&x, &b, &n, &y)) != MP_OKAY) goto LTM_ERR;
|
||||
|
||||
/* if y == 1 loop */
|
||||
if (mp_cmp_d(&y, 1uL) == MP_EQ)
|
||||
if (mp_cmp_d(&y, 1uL) == MP_EQ) {
|
||||
continue;
|
||||
|
||||
/* now x^2a mod n */
|
||||
if ((res = mp_sqrmod(&y, &n, &y)) != MP_OKAY) { /* y = x^2a mod n */
|
||||
goto LBL_Z;
|
||||
}
|
||||
|
||||
if (mp_cmp_d(&y, 1uL) == MP_EQ)
|
||||
continue;
|
||||
/* now x^2b mod n; y = x^2b mod n */
|
||||
if ((err = mp_sqrmod(&y, &n, &y)) != MP_OKAY) goto LTM_ERR;
|
||||
|
||||
/* compute x^b mod n */
|
||||
if ((res = mp_exptmod(&x, &b, &n, &y)) != MP_OKAY) { /* y = x^b mod n */
|
||||
goto LBL_Z;
|
||||
if (mp_cmp_d(&y, 1uL) == MP_EQ) {
|
||||
continue;
|
||||
}
|
||||
/* compute x^c mod n == x^ab mod n ; y = x^ab mod n */
|
||||
if ((err = mp_exptmod(&x, &c, &n, &y)) != MP_OKAY) goto LTM_ERR;
|
||||
|
||||
/* if y == 1 loop */
|
||||
if (mp_cmp_d(&y, 1uL) == MP_EQ)
|
||||
if (mp_cmp_d(&y, 1uL) == MP_EQ) {
|
||||
continue;
|
||||
|
||||
/* now x^2b mod n */
|
||||
if ((res = mp_sqrmod(&y, &n, &y)) != MP_OKAY) { /* y = x^2b mod n */
|
||||
goto LBL_Z;
|
||||
}
|
||||
|
||||
if (mp_cmp_d(&y, 1uL) == MP_EQ)
|
||||
continue;
|
||||
|
||||
/* compute x^c mod n == x^ab mod n */
|
||||
if ((res = mp_exptmod(&x, &c, &n, &y)) != MP_OKAY) { /* y = x^ab mod n */
|
||||
goto LBL_Z;
|
||||
}
|
||||
|
||||
/* if y == 1 loop */
|
||||
if (mp_cmp_d(&y, 1uL) == MP_EQ)
|
||||
continue;
|
||||
|
||||
/* now compute (x^c mod n)^2 */
|
||||
if ((res = mp_sqrmod(&y, &n, &y)) != MP_OKAY) { /* y = x^2ab mod n */
|
||||
goto LBL_Z;
|
||||
}
|
||||
/* now compute (x^c mod n)^2 ; y = x^2ab mod n */
|
||||
if ((err = mp_sqrmod(&y, &n, &y)) != MP_OKAY) goto LTM_ERR;
|
||||
|
||||
/* y should be 1 */
|
||||
if (mp_cmp_d(&y, 1uL) != MP_EQ)
|
||||
if (mp_cmp_d(&y, 1uL) != MP_EQ) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
/* no bases worked? */
|
||||
if (ii == li)
|
||||
if (ii == li) {
|
||||
goto top;
|
||||
|
||||
{
|
||||
char buf[4096];
|
||||
|
||||
mp_to_decimal(&n, buf, sizeof(buf));
|
||||
printf("Certificate of primality for:\n%s\n\n", buf);
|
||||
mp_to_decimal(&a, buf, sizeof(buf));
|
||||
printf("A == \n%s\n\n", buf);
|
||||
mp_to_decimal(&b, buf, sizeof(buf));
|
||||
printf("B == \n%s\n\nG == %lu\n", buf, bases[ii]);
|
||||
printf("----------------------------------------------------------------\n");
|
||||
}
|
||||
|
||||
mp_print("Certificate of primality for:\n ", &n, 10, stdout);
|
||||
mp_print("A == ", &a, 10, stdout);
|
||||
mp_print("B == ", &b, 10, stdout);
|
||||
mp_print("G == ", &x, 10, stdout);
|
||||
printf("----------------------------------------------------------------\n");
|
||||
|
||||
/* a = n */
|
||||
mp_copy(&n, &a);
|
||||
if ((err = mp_copy(&n, &a)) != MP_OKAY) goto LTM_ERR;
|
||||
}
|
||||
|
||||
/* get q to be the order of the large prime subgroup */
|
||||
mp_sub_d(&n, 1uL, q);
|
||||
mp_div_2(q, q);
|
||||
mp_div(q, &b, q, NULL);
|
||||
if ((err = mp_sub_d(&n, 1uL, q)) != MP_OKAY) goto LTM_ERR;
|
||||
if ((err = mp_div_2(q, q)) != MP_OKAY) goto LTM_ERR;
|
||||
if ((err = mp_div(q, &b, q, NULL)) != MP_OKAY) goto LTM_ERR;
|
||||
|
||||
mp_exch(&n, p);
|
||||
|
||||
res = MP_OKAY;
|
||||
LBL_Z:
|
||||
mp_clear(&z);
|
||||
LBL_Y:
|
||||
mp_clear(&y);
|
||||
LBL_X:
|
||||
mp_clear(&x);
|
||||
LBL_N:
|
||||
mp_clear(&n);
|
||||
LBL_B:
|
||||
mp_clear(&b);
|
||||
LBL_A:
|
||||
mp_clear(&a);
|
||||
LBL_V:
|
||||
mp_clear(&v);
|
||||
LBL_C:
|
||||
mp_clear(&c);
|
||||
return res;
|
||||
err = MP_OKAY;
|
||||
LTM_ERR:
|
||||
mp_clear_multi(&a, &b, &c, &n, &x, &y, &z, &v, NULL);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
mp_int p, q;
|
||||
mp_err err;
|
||||
char buf[4096];
|
||||
int k, li;
|
||||
clock_t t1;
|
||||
|
||||
srand(time(NULL));
|
||||
load_tab();
|
||||
|
||||
printf("Enter # of bits: \n");
|
||||
fgets(buf, sizeof(buf), stdin);
|
||||
sscanf(buf, "%d", &k);
|
||||
|
||||
printf("Enter number of bases to try (1 to 8):\n");
|
||||
printf("Enter number of bases to try\n");
|
||||
fgets(buf, sizeof(buf), stdin);
|
||||
sscanf(buf, "%d", &li);
|
||||
|
||||
|
||||
mp_init(&p);
|
||||
mp_init(&q);
|
||||
if ((err = mp_init_multi(&p, &q, NULL)) != MP_OKAY) goto LTM_ERR;
|
||||
|
||||
t1 = clock();
|
||||
pprime(k, li, &p, &q);
|
||||
if ((err = pprime(k, li, &p, &q)) != MP_OKAY) {
|
||||
fprintf(stderr, "Something went wrong in function pprime: %s\n", mp_error_to_string(err));
|
||||
goto LTM_ERR;
|
||||
}
|
||||
t1 = clock() - t1;
|
||||
|
||||
printf("\n\nTook %lu ticks, %d bits\n", t1, mp_count_bits(&p));
|
||||
|
||||
mp_to_decimal(&p, buf, sizeof(buf));
|
||||
printf("P == %s\n", buf);
|
||||
mp_to_decimal(&q, buf, sizeof(buf));
|
||||
printf("Q == %s\n", buf);
|
||||
mp_print("P == ", &p, 10, stdout);
|
||||
mp_print("Q == ", &q, 10, stdout);
|
||||
|
||||
return 0;
|
||||
mp_clear_multi(&p, &q, NULL);
|
||||
exit(EXIT_SUCCESS);
|
||||
LTM_ERR:
|
||||
mp_clear_multi(&p, &q, NULL);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
2
deps/libtommath/helper.pl
vendored
2
deps/libtommath/helper.pl
vendored
@ -394,7 +394,7 @@ EOS
|
||||
foreach my $filename (glob '*mp_*.c') {
|
||||
my $content;
|
||||
my $cc = $ENV{'CC'} || 'gcc';
|
||||
$content = `$cc -E -x c -DLTM_ALL $filename`;
|
||||
$content = `$cc -E -x c -DLTM_ALL -DMP_SMALL_STACK_SIZE $filename`;
|
||||
$content =~ s/^# 1 "$filename".*?^# 2 "$filename"//ms;
|
||||
|
||||
# convert filename to upper case so we can use it as a define
|
||||
|
16
deps/libtommath/libtommath_VS2008.vcproj
vendored
16
deps/libtommath/libtommath_VS2008.vcproj
vendored
@ -792,6 +792,10 @@
|
||||
RelativePath="mp_unpack.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="mp_warray_free.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="mp_xor.c"
|
||||
>
|
||||
@ -928,6 +932,18 @@
|
||||
RelativePath="s_mp_sub.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="s_mp_warray.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="s_mp_warray_get.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="s_mp_warray_put.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="s_mp_zero_buf.c"
|
||||
>
|
||||
|
31
deps/libtommath/makefile
vendored
31
deps/libtommath/makefile
vendored
@ -43,13 +43,14 @@ mp_reduce_2k_l.o mp_reduce_2k_setup.o mp_reduce_2k_setup_l.o mp_reduce_is_2k.o m
|
||||
mp_reduce_setup.o mp_root_n.o mp_rshd.o mp_sbin_size.o mp_set.o mp_set_double.o mp_set_i32.o mp_set_i64.o \
|
||||
mp_set_l.o mp_set_u32.o mp_set_u64.o mp_set_ul.o mp_shrink.o mp_signed_rsh.o mp_sqrmod.o mp_sqrt.o \
|
||||
mp_sqrtmod_prime.o mp_sub.o mp_sub_d.o mp_submod.o mp_to_radix.o mp_to_sbin.o mp_to_ubin.o mp_ubin_size.o \
|
||||
mp_unpack.o mp_xor.o mp_zero.o s_mp_add.o s_mp_copy_digs.o s_mp_div_3.o s_mp_div_recursive.o \
|
||||
s_mp_div_school.o s_mp_div_small.o s_mp_exptmod.o s_mp_exptmod_fast.o s_mp_fp_log.o s_mp_fp_log_d.o \
|
||||
s_mp_get_bit.o s_mp_invmod.o s_mp_invmod_odd.o s_mp_log_2expt.o s_mp_montgomery_reduce_comba.o s_mp_mul.o \
|
||||
s_mp_mul_balance.o s_mp_mul_comba.o s_mp_mul_high.o s_mp_mul_high_comba.o s_mp_mul_karatsuba.o \
|
||||
s_mp_mul_toom.o s_mp_prime_is_divisible.o s_mp_prime_tab.o s_mp_radix_map.o \
|
||||
s_mp_radix_size_overestimate.o s_mp_rand_platform.o s_mp_sqr.o s_mp_sqr_comba.o s_mp_sqr_karatsuba.o \
|
||||
s_mp_sqr_toom.o s_mp_sub.o s_mp_zero_buf.o s_mp_zero_digs.o
|
||||
mp_unpack.o mp_warray_free.o mp_xor.o mp_zero.o s_mp_add.o s_mp_copy_digs.o s_mp_div_3.o \
|
||||
s_mp_div_recursive.o s_mp_div_school.o s_mp_div_small.o s_mp_exptmod.o s_mp_exptmod_fast.o s_mp_fp_log.o \
|
||||
s_mp_fp_log_d.o s_mp_get_bit.o s_mp_invmod.o s_mp_invmod_odd.o s_mp_log_2expt.o \
|
||||
s_mp_montgomery_reduce_comba.o s_mp_mul.o s_mp_mul_balance.o s_mp_mul_comba.o s_mp_mul_high.o \
|
||||
s_mp_mul_high_comba.o s_mp_mul_karatsuba.o s_mp_mul_toom.o s_mp_prime_is_divisible.o s_mp_prime_tab.o \
|
||||
s_mp_radix_map.o s_mp_radix_size_overestimate.o s_mp_rand_platform.o s_mp_sqr.o s_mp_sqr_comba.o \
|
||||
s_mp_sqr_karatsuba.o s_mp_sqr_toom.o s_mp_sub.o s_mp_warray.o s_mp_warray_get.o s_mp_warray_put.o \
|
||||
s_mp_zero_buf.o s_mp_zero_digs.o
|
||||
|
||||
#END_INS
|
||||
|
||||
@ -107,6 +108,10 @@ tune: $(LIBNAME)
|
||||
$(MAKE) -C etc tune CFLAGS="$(LTM_CFLAGS) -I../"
|
||||
$(MAKE)
|
||||
|
||||
etc-all: $(LIBNAME)
|
||||
$(MAKE) -C etc all CFLAGS="$(LTM_CFLAGS) -I../"
|
||||
$(MAKE)
|
||||
|
||||
# You have to create a file .coveralls.yml with the content "repo_token: <the token>"
|
||||
# in the base folder to be able to submit to coveralls
|
||||
coveralls: lcov
|
||||
@ -122,8 +127,12 @@ cmp: profiled_single
|
||||
./timing
|
||||
$(MAKE) -C logs/ cmp
|
||||
|
||||
zipup:
|
||||
$(MAKE) clean
|
||||
$(MAKE) .zipup
|
||||
|
||||
TODAY=$(shell date -I)
|
||||
zipup: clean astyle new_file docs
|
||||
.zipup: astyle new_file docs
|
||||
@# Update the index, so diff-index won't fail in case the pdf has been created.
|
||||
@# As the pdf creation modifies the tex files, git sometimes detects the
|
||||
@# modified files, but misses that it's put back to its original version.
|
||||
@ -164,9 +173,10 @@ c89:
|
||||
-e 's/UINT32_MAX/0xFFFFFFFFu/g' \
|
||||
-e 's/UINT64_MAX/(mp_u64)-1/g' \
|
||||
-e 's/INT32_MAX/0x7FFFFFFF/g' \
|
||||
-e 's/INT32_MIN/(-2147483647-1)/g' \
|
||||
-e 's/INT32_MIN/(-2147483647-1)/g' \
|
||||
-e 's/INT64_MAX/(mp_i64)(((mp_u64)1<<63)-1)/g' \
|
||||
-e 's/INT64_MIN/(mp_i64)((mp_u64)1<<63)/g' \
|
||||
-e 's/uintptr_t/mp_uintptr/g' \
|
||||
-e 's/SIZE_MAX/((size_t)-1)/g' \
|
||||
-e 's/\(PRI[ioux]64\)/MP_\1/g' \
|
||||
-e 's/uint\([0-9][0-9]*\)_t/mp_u\1/g' \
|
||||
@ -187,10 +197,11 @@ c99:
|
||||
-e 's/false_/MP_NO_/g' \
|
||||
-e 's/0xFFFFFFFFu/UINT32_MAX/g' \
|
||||
-e 's/(mp_u64)-1/UINT64_MAX/g' \
|
||||
-e 's/(-2147483647-1)/INT32_MIN/g' \
|
||||
-e 's/(-2147483647-1)/INT32_MIN/g' \
|
||||
-e 's/0x7FFFFFFF/INT32_MAX/g' \
|
||||
-e 's/(mp_i64)((mp_u64)1<<63)/INT64_MIN/g' \
|
||||
-e 's/(mp_i64)(((mp_u64)1<<63)-1)/INT64_MAX/g' \
|
||||
-e 's/mp_uintptr/uintptr_t/g' \
|
||||
-e 's/((size_t)-1)/SIZE_MAX/g' \
|
||||
-e 's/MP_\(PRI[ioux]64\)/\1/g' \
|
||||
-e 's/mp_u\([0-9][0-9]*\)/uint\1_t/g' \
|
||||
|
15
deps/libtommath/makefile.mingw
vendored
15
deps/libtommath/makefile.mingw
vendored
@ -45,13 +45,14 @@ mp_reduce_2k_l.o mp_reduce_2k_setup.o mp_reduce_2k_setup_l.o mp_reduce_is_2k.o m
|
||||
mp_reduce_setup.o mp_root_n.o mp_rshd.o mp_sbin_size.o mp_set.o mp_set_double.o mp_set_i32.o mp_set_i64.o \
|
||||
mp_set_l.o mp_set_u32.o mp_set_u64.o mp_set_ul.o mp_shrink.o mp_signed_rsh.o mp_sqrmod.o mp_sqrt.o \
|
||||
mp_sqrtmod_prime.o mp_sub.o mp_sub_d.o mp_submod.o mp_to_radix.o mp_to_sbin.o mp_to_ubin.o mp_ubin_size.o \
|
||||
mp_unpack.o mp_xor.o mp_zero.o s_mp_add.o s_mp_copy_digs.o s_mp_div_3.o s_mp_div_recursive.o \
|
||||
s_mp_div_school.o s_mp_div_small.o s_mp_exptmod.o s_mp_exptmod_fast.o s_mp_fp_log.o s_mp_fp_log_d.o \
|
||||
s_mp_get_bit.o s_mp_invmod.o s_mp_invmod_odd.o s_mp_log_2expt.o s_mp_montgomery_reduce_comba.o s_mp_mul.o \
|
||||
s_mp_mul_balance.o s_mp_mul_comba.o s_mp_mul_high.o s_mp_mul_high_comba.o s_mp_mul_karatsuba.o \
|
||||
s_mp_mul_toom.o s_mp_prime_is_divisible.o s_mp_prime_tab.o s_mp_radix_map.o \
|
||||
s_mp_radix_size_overestimate.o s_mp_rand_platform.o s_mp_sqr.o s_mp_sqr_comba.o s_mp_sqr_karatsuba.o \
|
||||
s_mp_sqr_toom.o s_mp_sub.o s_mp_zero_buf.o s_mp_zero_digs.o
|
||||
mp_unpack.o mp_warray_free.o mp_xor.o mp_zero.o s_mp_add.o s_mp_copy_digs.o s_mp_div_3.o \
|
||||
s_mp_div_recursive.o s_mp_div_school.o s_mp_div_small.o s_mp_exptmod.o s_mp_exptmod_fast.o s_mp_fp_log.o \
|
||||
s_mp_fp_log_d.o s_mp_get_bit.o s_mp_invmod.o s_mp_invmod_odd.o s_mp_log_2expt.o \
|
||||
s_mp_montgomery_reduce_comba.o s_mp_mul.o s_mp_mul_balance.o s_mp_mul_comba.o s_mp_mul_high.o \
|
||||
s_mp_mul_high_comba.o s_mp_mul_karatsuba.o s_mp_mul_toom.o s_mp_prime_is_divisible.o s_mp_prime_tab.o \
|
||||
s_mp_radix_map.o s_mp_radix_size_overestimate.o s_mp_rand_platform.o s_mp_sqr.o s_mp_sqr_comba.o \
|
||||
s_mp_sqr_karatsuba.o s_mp_sqr_toom.o s_mp_sub.o s_mp_warray.o s_mp_warray_get.o s_mp_warray_put.o \
|
||||
s_mp_zero_buf.o s_mp_zero_digs.o
|
||||
|
||||
HEADERS_PUB=tommath.h
|
||||
HEADERS=tommath_private.h tommath_class.h tommath_superclass.h tommath_cutoffs.h $(HEADERS_PUB)
|
||||
|
15
deps/libtommath/makefile.msvc
vendored
15
deps/libtommath/makefile.msvc
vendored
@ -41,13 +41,14 @@ mp_reduce_2k_l.obj mp_reduce_2k_setup.obj mp_reduce_2k_setup_l.obj mp_reduce_is_
|
||||
mp_reduce_setup.obj mp_root_n.obj mp_rshd.obj mp_sbin_size.obj mp_set.obj mp_set_double.obj mp_set_i32.obj mp_set_i64.obj \
|
||||
mp_set_l.obj mp_set_u32.obj mp_set_u64.obj mp_set_ul.obj mp_shrink.obj mp_signed_rsh.obj mp_sqrmod.obj mp_sqrt.obj \
|
||||
mp_sqrtmod_prime.obj mp_sub.obj mp_sub_d.obj mp_submod.obj mp_to_radix.obj mp_to_sbin.obj mp_to_ubin.obj mp_ubin_size.obj \
|
||||
mp_unpack.obj mp_xor.obj mp_zero.obj s_mp_add.obj s_mp_copy_digs.obj s_mp_div_3.obj s_mp_div_recursive.obj \
|
||||
s_mp_div_school.obj s_mp_div_small.obj s_mp_exptmod.obj s_mp_exptmod_fast.obj s_mp_fp_log.obj s_mp_fp_log_d.obj \
|
||||
s_mp_get_bit.obj s_mp_invmod.obj s_mp_invmod_odd.obj s_mp_log_2expt.obj s_mp_montgomery_reduce_comba.obj s_mp_mul.obj \
|
||||
s_mp_mul_balance.obj s_mp_mul_comba.obj s_mp_mul_high.obj s_mp_mul_high_comba.obj s_mp_mul_karatsuba.obj \
|
||||
s_mp_mul_toom.obj s_mp_prime_is_divisible.obj s_mp_prime_tab.obj s_mp_radix_map.obj \
|
||||
s_mp_radix_size_overestimate.obj s_mp_rand_platform.obj s_mp_sqr.obj s_mp_sqr_comba.obj s_mp_sqr_karatsuba.obj \
|
||||
s_mp_sqr_toom.obj s_mp_sub.obj s_mp_zero_buf.obj s_mp_zero_digs.obj
|
||||
mp_unpack.obj mp_warray_free.obj mp_xor.obj mp_zero.obj s_mp_add.obj s_mp_copy_digs.obj s_mp_div_3.obj \
|
||||
s_mp_div_recursive.obj s_mp_div_school.obj s_mp_div_small.obj s_mp_exptmod.obj s_mp_exptmod_fast.obj s_mp_fp_log.obj \
|
||||
s_mp_fp_log_d.obj s_mp_get_bit.obj s_mp_invmod.obj s_mp_invmod_odd.obj s_mp_log_2expt.obj \
|
||||
s_mp_montgomery_reduce_comba.obj s_mp_mul.obj s_mp_mul_balance.obj s_mp_mul_comba.obj s_mp_mul_high.obj \
|
||||
s_mp_mul_high_comba.obj s_mp_mul_karatsuba.obj s_mp_mul_toom.obj s_mp_prime_is_divisible.obj s_mp_prime_tab.obj \
|
||||
s_mp_radix_map.obj s_mp_radix_size_overestimate.obj s_mp_rand_platform.obj s_mp_sqr.obj s_mp_sqr_comba.obj \
|
||||
s_mp_sqr_karatsuba.obj s_mp_sqr_toom.obj s_mp_sub.obj s_mp_warray.obj s_mp_warray_get.obj s_mp_warray_put.obj \
|
||||
s_mp_zero_buf.obj s_mp_zero_digs.obj
|
||||
|
||||
HEADERS_PUB=tommath.h
|
||||
HEADERS=tommath_private.h tommath_class.h tommath_superclass.h tommath_cutoffs.h $(HEADERS_PUB)
|
||||
|
15
deps/libtommath/makefile.shared
vendored
15
deps/libtommath/makefile.shared
vendored
@ -40,13 +40,14 @@ mp_reduce_2k_l.o mp_reduce_2k_setup.o mp_reduce_2k_setup_l.o mp_reduce_is_2k.o m
|
||||
mp_reduce_setup.o mp_root_n.o mp_rshd.o mp_sbin_size.o mp_set.o mp_set_double.o mp_set_i32.o mp_set_i64.o \
|
||||
mp_set_l.o mp_set_u32.o mp_set_u64.o mp_set_ul.o mp_shrink.o mp_signed_rsh.o mp_sqrmod.o mp_sqrt.o \
|
||||
mp_sqrtmod_prime.o mp_sub.o mp_sub_d.o mp_submod.o mp_to_radix.o mp_to_sbin.o mp_to_ubin.o mp_ubin_size.o \
|
||||
mp_unpack.o mp_xor.o mp_zero.o s_mp_add.o s_mp_copy_digs.o s_mp_div_3.o s_mp_div_recursive.o \
|
||||
s_mp_div_school.o s_mp_div_small.o s_mp_exptmod.o s_mp_exptmod_fast.o s_mp_fp_log.o s_mp_fp_log_d.o \
|
||||
s_mp_get_bit.o s_mp_invmod.o s_mp_invmod_odd.o s_mp_log_2expt.o s_mp_montgomery_reduce_comba.o s_mp_mul.o \
|
||||
s_mp_mul_balance.o s_mp_mul_comba.o s_mp_mul_high.o s_mp_mul_high_comba.o s_mp_mul_karatsuba.o \
|
||||
s_mp_mul_toom.o s_mp_prime_is_divisible.o s_mp_prime_tab.o s_mp_radix_map.o \
|
||||
s_mp_radix_size_overestimate.o s_mp_rand_platform.o s_mp_sqr.o s_mp_sqr_comba.o s_mp_sqr_karatsuba.o \
|
||||
s_mp_sqr_toom.o s_mp_sub.o s_mp_zero_buf.o s_mp_zero_digs.o
|
||||
mp_unpack.o mp_warray_free.o mp_xor.o mp_zero.o s_mp_add.o s_mp_copy_digs.o s_mp_div_3.o \
|
||||
s_mp_div_recursive.o s_mp_div_school.o s_mp_div_small.o s_mp_exptmod.o s_mp_exptmod_fast.o s_mp_fp_log.o \
|
||||
s_mp_fp_log_d.o s_mp_get_bit.o s_mp_invmod.o s_mp_invmod_odd.o s_mp_log_2expt.o \
|
||||
s_mp_montgomery_reduce_comba.o s_mp_mul.o s_mp_mul_balance.o s_mp_mul_comba.o s_mp_mul_high.o \
|
||||
s_mp_mul_high_comba.o s_mp_mul_karatsuba.o s_mp_mul_toom.o s_mp_prime_is_divisible.o s_mp_prime_tab.o \
|
||||
s_mp_radix_map.o s_mp_radix_size_overestimate.o s_mp_rand_platform.o s_mp_sqr.o s_mp_sqr_comba.o \
|
||||
s_mp_sqr_karatsuba.o s_mp_sqr_toom.o s_mp_sub.o s_mp_warray.o s_mp_warray_get.o s_mp_warray_put.o \
|
||||
s_mp_zero_buf.o s_mp_zero_digs.o
|
||||
|
||||
#END_INS
|
||||
|
||||
|
17
deps/libtommath/makefile.unix
vendored
17
deps/libtommath/makefile.unix
vendored
@ -20,7 +20,7 @@ ARFLAGS = rcs
|
||||
CFLAGS = -O2
|
||||
LDFLAGS =
|
||||
|
||||
VERSION = 1.2.1
|
||||
VERSION = 1.3.0
|
||||
|
||||
#Compilation flags
|
||||
LTM_CFLAGS = -I. $(CFLAGS)
|
||||
@ -46,13 +46,14 @@ mp_reduce_2k_l.o mp_reduce_2k_setup.o mp_reduce_2k_setup_l.o mp_reduce_is_2k.o m
|
||||
mp_reduce_setup.o mp_root_n.o mp_rshd.o mp_sbin_size.o mp_set.o mp_set_double.o mp_set_i32.o mp_set_i64.o \
|
||||
mp_set_l.o mp_set_u32.o mp_set_u64.o mp_set_ul.o mp_shrink.o mp_signed_rsh.o mp_sqrmod.o mp_sqrt.o \
|
||||
mp_sqrtmod_prime.o mp_sub.o mp_sub_d.o mp_submod.o mp_to_radix.o mp_to_sbin.o mp_to_ubin.o mp_ubin_size.o \
|
||||
mp_unpack.o mp_xor.o mp_zero.o s_mp_add.o s_mp_copy_digs.o s_mp_div_3.o s_mp_div_recursive.o \
|
||||
s_mp_div_school.o s_mp_div_small.o s_mp_exptmod.o s_mp_exptmod_fast.o s_mp_fp_log.o s_mp_fp_log_d.o \
|
||||
s_mp_get_bit.o s_mp_invmod.o s_mp_invmod_odd.o s_mp_log_2expt.o s_mp_montgomery_reduce_comba.o s_mp_mul.o \
|
||||
s_mp_mul_balance.o s_mp_mul_comba.o s_mp_mul_high.o s_mp_mul_high_comba.o s_mp_mul_karatsuba.o \
|
||||
s_mp_mul_toom.o s_mp_prime_is_divisible.o s_mp_prime_tab.o s_mp_radix_map.o \
|
||||
s_mp_radix_size_overestimate.o s_mp_rand_platform.o s_mp_sqr.o s_mp_sqr_comba.o s_mp_sqr_karatsuba.o \
|
||||
s_mp_sqr_toom.o s_mp_sub.o s_mp_zero_buf.o s_mp_zero_digs.o
|
||||
mp_unpack.o mp_warray_free.o mp_xor.o mp_zero.o s_mp_add.o s_mp_copy_digs.o s_mp_div_3.o \
|
||||
s_mp_div_recursive.o s_mp_div_school.o s_mp_div_small.o s_mp_exptmod.o s_mp_exptmod_fast.o s_mp_fp_log.o \
|
||||
s_mp_fp_log_d.o s_mp_get_bit.o s_mp_invmod.o s_mp_invmod_odd.o s_mp_log_2expt.o \
|
||||
s_mp_montgomery_reduce_comba.o s_mp_mul.o s_mp_mul_balance.o s_mp_mul_comba.o s_mp_mul_high.o \
|
||||
s_mp_mul_high_comba.o s_mp_mul_karatsuba.o s_mp_mul_toom.o s_mp_prime_is_divisible.o s_mp_prime_tab.o \
|
||||
s_mp_radix_map.o s_mp_radix_size_overestimate.o s_mp_rand_platform.o s_mp_sqr.o s_mp_sqr_comba.o \
|
||||
s_mp_sqr_karatsuba.o s_mp_sqr_toom.o s_mp_sub.o s_mp_warray.o s_mp_warray_get.o s_mp_warray_put.o \
|
||||
s_mp_zero_buf.o s_mp_zero_digs.o
|
||||
|
||||
|
||||
HEADERS_PUB=tommath.h
|
||||
|
8
deps/libtommath/makefile_include.mk
vendored
8
deps/libtommath/makefile_include.mk
vendored
@ -3,9 +3,9 @@
|
||||
#
|
||||
|
||||
#version of library
|
||||
VERSION=1.2.1-develop
|
||||
VERSION_PC=1.2.1
|
||||
VERSION_SO=3:1:2
|
||||
VERSION=1.3.0-develop
|
||||
VERSION_PC=1.3.0
|
||||
VERSION_SO=4:0:3
|
||||
|
||||
PLATFORM := $(shell uname | sed -e 's/_.*//')
|
||||
|
||||
@ -97,7 +97,7 @@ endif
|
||||
endif # COMPILE_SIZE
|
||||
|
||||
ifneq ($(findstring clang,$(CC)),)
|
||||
LTM_CFLAGS += -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header
|
||||
LTM_CFLAGS += -Wno-unknown-warning-option -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header -Wno-incomplete-setjmp-declaration
|
||||
ifdef IGNORE_SPEED
|
||||
#for dead code eliminiation
|
||||
LTM_CFLAGS += -O1
|
||||
|
2
deps/libtommath/mp_prime_rand.c
vendored
2
deps/libtommath/mp_prime_rand.c
vendored
@ -26,7 +26,7 @@ mp_err mp_prime_rand(mp_int *a, int t, int size, int flags)
|
||||
mp_err err;
|
||||
|
||||
/* sanity check the input */
|
||||
if ((size <= 1) || (t <= 0)) {
|
||||
if (size <= 1) {
|
||||
return MP_VAL;
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,8 @@ mp_err mp_prime_strong_lucas_selfridge(const mp_int *a, bool *result)
|
||||
{
|
||||
/* CZ TODO: choose better variable names! */
|
||||
mp_int Dz, gcd, Np1, Uz, Vz, U2mz, V2mz, Qmz, Q2mz, Qkdz, T1z, T2z, T3z, T4z, Q2kdz;
|
||||
int32_t D, Ds, J, sign, P, Q, r, s, u, Nbits;
|
||||
int J;
|
||||
int32_t D, Ds, sign, P, Q, r, s, u, Nbits;
|
||||
mp_err err;
|
||||
bool oddness;
|
||||
|
||||
|
11
deps/libtommath/mp_reduce_is_2k.c
vendored
11
deps/libtommath/mp_reduce_is_2k.c
vendored
@ -11,9 +11,16 @@ bool mp_reduce_is_2k(const mp_int *a)
|
||||
} else if (a->used == 1) {
|
||||
return true;
|
||||
} else if (a->used > 1) {
|
||||
int ix, iy = mp_count_bits(a), iw = 1;
|
||||
mp_digit iz = 1;
|
||||
int ix, iy, iw = 1;
|
||||
mp_digit iz;
|
||||
/* Algorithm as implemented does not work if the least significant digit is zero */
|
||||
iz = a->dp[0] & MP_MASK;
|
||||
if (iz == 0u) {
|
||||
return false;
|
||||
}
|
||||
|
||||
iy = mp_count_bits(a);
|
||||
iz = 1;
|
||||
/* Test every bit from the second digit up, must be 1 */
|
||||
for (ix = MP_DIGIT_BIT; ix < iy; ix++) {
|
||||
if ((a->dp[iw] & iz) == 0u) {
|
||||
|
28
deps/libtommath/mp_warray_free.c
vendored
Normal file
28
deps/libtommath/mp_warray_free.c
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#include "tommath_private.h"
|
||||
#ifdef MP_WARRAY_FREE_C
|
||||
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
|
||||
/* SPDX-License-Identifier: Unlicense */
|
||||
|
||||
/* static check that the multiplication won't overflow */
|
||||
MP_STATIC_ASSERT(warray_free_sz_does_not_overflow, (sizeof(mp_word) * MP_WARRAY) >= MP_WARRAY)
|
||||
|
||||
static int s_warray_free(void)
|
||||
{
|
||||
int ret = 0;
|
||||
if (s_mp_warray.w_used)
|
||||
return -2;
|
||||
if (s_mp_warray.w_free) {
|
||||
s_mp_zero_buf(s_mp_warray.w_free, sizeof(mp_word) * MP_WARRAY);
|
||||
MP_FREE(s_mp_warray.w_free, sizeof(mp_word) * MP_WARRAY);
|
||||
s_mp_warray.w_free = NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int mp_warray_free(void)
|
||||
{
|
||||
if (MP_HAS(MP_SMALL_STACK_SIZE)) return s_warray_free();
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
@ -15,9 +15,12 @@ mp_err s_mp_montgomery_reduce_comba(mp_int *x, const mp_int *n, mp_digit rho)
|
||||
{
|
||||
int ix, oldused;
|
||||
mp_err err;
|
||||
mp_word W[MP_WARRAY];
|
||||
mp_word MP_ALLOC_WARRAY(W);
|
||||
|
||||
MP_CHECK_WARRAY(W);
|
||||
|
||||
if (x->used > MP_WARRAY) {
|
||||
MP_FREE_WARRAY(W);
|
||||
return MP_VAL;
|
||||
}
|
||||
|
||||
@ -26,6 +29,7 @@ mp_err s_mp_montgomery_reduce_comba(mp_int *x, const mp_int *n, mp_digit rho)
|
||||
|
||||
/* grow a as required */
|
||||
if ((err = mp_grow(x, n->used + 1)) != MP_OKAY) {
|
||||
MP_FREE_WARRAY(W);
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -110,6 +114,7 @@ mp_err s_mp_montgomery_reduce_comba(mp_int *x, const mp_int *n, mp_digit rho)
|
||||
|
||||
mp_clamp(x);
|
||||
|
||||
MP_FREE_WARRAY(W);
|
||||
/* if A >= m then A = A - m */
|
||||
if (mp_cmp_mag(x, n) != MP_LT) {
|
||||
return s_mp_sub(x, n, x);
|
||||
|
7
deps/libtommath/s_mp_mul_comba.c
vendored
7
deps/libtommath/s_mp_mul_comba.c
vendored
@ -23,15 +23,19 @@ mp_err s_mp_mul_comba(const mp_int *a, const mp_int *b, mp_int *c, int digs)
|
||||
{
|
||||
int oldused, pa, ix;
|
||||
mp_err err;
|
||||
mp_digit W[MP_WARRAY];
|
||||
mp_digit MP_ALLOC_WARRAY(W);
|
||||
mp_word _W;
|
||||
|
||||
MP_CHECK_WARRAY(W);
|
||||
|
||||
if (digs < 0) {
|
||||
MP_FREE_WARRAY(W);
|
||||
return MP_VAL;
|
||||
}
|
||||
|
||||
/* grow the destination as required */
|
||||
if ((err = mp_grow(c, digs)) != MP_OKAY) {
|
||||
MP_FREE_WARRAY(W);
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -77,6 +81,7 @@ mp_err s_mp_mul_comba(const mp_int *a, const mp_int *b, mp_int *c, int digs)
|
||||
s_mp_zero_digs(c->dp + c->used, oldused - c->used);
|
||||
|
||||
mp_clamp(c);
|
||||
MP_FREE_WARRAY(W);
|
||||
return MP_OKAY;
|
||||
}
|
||||
#endif
|
||||
|
7
deps/libtommath/s_mp_mul_high_comba.c
vendored
7
deps/libtommath/s_mp_mul_high_comba.c
vendored
@ -16,16 +16,20 @@ mp_err s_mp_mul_high_comba(const mp_int *a, const mp_int *b, mp_int *c, int digs
|
||||
{
|
||||
int oldused, pa, ix;
|
||||
mp_err err;
|
||||
mp_digit W[MP_WARRAY];
|
||||
mp_digit MP_ALLOC_WARRAY(W);
|
||||
mp_word _W;
|
||||
|
||||
MP_CHECK_WARRAY(W);
|
||||
|
||||
if (digs < 0) {
|
||||
MP_FREE_WARRAY(W);
|
||||
return MP_VAL;
|
||||
}
|
||||
|
||||
/* grow the destination as required */
|
||||
pa = a->used + b->used;
|
||||
if ((err = mp_grow(c, pa)) != MP_OKAY) {
|
||||
MP_FREE_WARRAY(W);
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -69,6 +73,7 @@ mp_err s_mp_mul_high_comba(const mp_int *a, const mp_int *b, mp_int *c, int digs
|
||||
s_mp_zero_digs(c->dp + c->used, oldused - c->used);
|
||||
|
||||
mp_clamp(c);
|
||||
MP_FREE_WARRAY(W);
|
||||
return MP_OKAY;
|
||||
}
|
||||
#endif
|
||||
|
6
deps/libtommath/s_mp_sqr_comba.c
vendored
6
deps/libtommath/s_mp_sqr_comba.c
vendored
@ -16,13 +16,16 @@ After that loop you do the squares and add them in.
|
||||
mp_err s_mp_sqr_comba(const mp_int *a, mp_int *b)
|
||||
{
|
||||
int oldused, pa, ix;
|
||||
mp_digit W[MP_WARRAY];
|
||||
mp_digit MP_ALLOC_WARRAY(W);
|
||||
mp_word W1;
|
||||
mp_err err;
|
||||
|
||||
MP_CHECK_WARRAY(W);
|
||||
|
||||
/* grow the destination as required */
|
||||
pa = a->used + a->used;
|
||||
if ((err = mp_grow(b, pa)) != MP_OKAY) {
|
||||
MP_FREE_WARRAY(W);
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -82,6 +85,7 @@ mp_err s_mp_sqr_comba(const mp_int *a, mp_int *b)
|
||||
s_mp_zero_digs(b->dp + b->used, oldused - b->used);
|
||||
|
||||
mp_clamp(b);
|
||||
MP_FREE_WARRAY(W);
|
||||
return MP_OKAY;
|
||||
}
|
||||
#endif
|
||||
|
8
deps/libtommath/s_mp_warray.c
vendored
Normal file
8
deps/libtommath/s_mp_warray.c
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
#include "tommath_private.h"
|
||||
#ifdef S_MP_WARRAY_C
|
||||
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
|
||||
/* SPDX-License-Identifier: Unlicense */
|
||||
|
||||
mp_thread st_warray s_mp_warray = { 0 };
|
||||
|
||||
#endif
|
18
deps/libtommath/s_mp_warray_get.c
vendored
Normal file
18
deps/libtommath/s_mp_warray_get.c
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
#include "tommath_private.h"
|
||||
#ifdef S_MP_WARRAY_GET_C
|
||||
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
|
||||
/* SPDX-License-Identifier: Unlicense */
|
||||
|
||||
void *s_mp_warray_get(void)
|
||||
{
|
||||
if (s_mp_warray.w_used)
|
||||
return NULL;
|
||||
if (s_mp_warray.w_free == NULL) {
|
||||
s_mp_warray.w_free = MP_CALLOC(MP_WARRAY, sizeof(mp_word));
|
||||
}
|
||||
s_mp_warray.w_used = s_mp_warray.w_free;
|
||||
s_mp_warray.w_free = NULL;
|
||||
return s_mp_warray.w_used;
|
||||
}
|
||||
|
||||
#endif
|
14
deps/libtommath/s_mp_warray_put.c
vendored
Normal file
14
deps/libtommath/s_mp_warray_put.c
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
#include "tommath_private.h"
|
||||
#ifdef S_MP_WARRAY_PUT_C
|
||||
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
|
||||
/* SPDX-License-Identifier: Unlicense */
|
||||
|
||||
void s_mp_warray_put(void *w)
|
||||
{
|
||||
if (s_mp_warray.w_free || s_mp_warray.w_used != w)
|
||||
return;
|
||||
s_mp_warray.w_free = w;
|
||||
s_mp_warray.w_used = NULL;
|
||||
}
|
||||
|
||||
#endif
|
4
deps/libtommath/sources.cmake
vendored
4
deps/libtommath/sources.cmake
vendored
@ -122,6 +122,7 @@ mp_to_sbin.c
|
||||
mp_to_ubin.c
|
||||
mp_ubin_size.c
|
||||
mp_unpack.c
|
||||
mp_warray_free.c
|
||||
mp_xor.c
|
||||
mp_zero.c
|
||||
s_mp_add.c
|
||||
@ -156,6 +157,9 @@ s_mp_sqr_comba.c
|
||||
s_mp_sqr_karatsuba.c
|
||||
s_mp_sqr_toom.c
|
||||
s_mp_sub.c
|
||||
s_mp_warray.c
|
||||
s_mp_warray_get.c
|
||||
s_mp_warray_put.c
|
||||
s_mp_zero_buf.c
|
||||
s_mp_zero_digs.c
|
||||
)
|
||||
|
37
deps/libtommath/testme.sh
vendored
37
deps/libtommath/testme.sh
vendored
@ -70,6 +70,8 @@ All other options will be tested with all MP_xBIT configurations.
|
||||
runtime and may trigger the 30 minutes
|
||||
timeout.
|
||||
|
||||
--multithread Run tests in multi-threaded mode (via pthread).
|
||||
|
||||
Godmode:
|
||||
|
||||
--all Choose all architectures and gcc and clang
|
||||
@ -128,7 +130,7 @@ _make()
|
||||
echo -ne " Compile $1 $2"
|
||||
suffix=$(echo ${1}${2} | tr ' ' '_')
|
||||
_fixup_cflags "$1"
|
||||
CC="$1" CFLAGS="$2 $TEST_CFLAGS" make -j$MAKE_JOBS $3 $MAKE_OPTIONS 2>gcc_errors_${suffix}.log
|
||||
CC="$1" CFLAGS="$2 $TEST_CFLAGS" LFLAGS="$4" LDFLAGS="$5" make -j$MAKE_JOBS $3 $MAKE_OPTIONS 2>gcc_errors_${suffix}.log
|
||||
errcnt=$(wc -l < gcc_errors_${suffix}.log)
|
||||
if [[ ${errcnt} -gt 1 ]]; then
|
||||
echo " failed"
|
||||
@ -148,10 +150,10 @@ _runtest()
|
||||
# "make tune" will run "tune_it.sh" automatically, hence "autotune", but it cannot
|
||||
# get switched off without some effort, so we just let it run twice for testing purposes
|
||||
echo -e "\rRun autotune $1 $2"
|
||||
_make "$1" "$2" ""
|
||||
_make "$1" "$2" "" "$3" "$4"
|
||||
$_timeout $TUNE_CMD > test_${suffix}.log || _die "running autotune" $?
|
||||
else
|
||||
_make "$1" "$2" "test"
|
||||
_make "$1" "$2" "test" "$3" "$4"
|
||||
echo -e "\rRun test $1 $2"
|
||||
$_timeout ./test > test_${suffix}.log || _die "running tests" $?
|
||||
fi
|
||||
@ -171,13 +173,13 @@ echo "MAKE_OPTIONS = \"$MAKE_OPTIONS\""
|
||||
if [[ "$MAKE_OPTIONS" =~ "tune" ]]
|
||||
then
|
||||
echo "autotune branch"
|
||||
_make "$1" "$2" ""
|
||||
_make "$1" "$2" "" "$3" "$4"
|
||||
# The shell used for /bin/sh is DASH 0.5.7-4ubuntu1 on the author's machine which fails valgrind, so
|
||||
# we just run on instance of etc/tune with the same options as in etc/tune_it.sh
|
||||
echo -e "\rRun etc/tune $1 $2 once inside valgrind"
|
||||
$_timeout $VALGRIND_BIN $VALGRIND_OPTS $TUNE_CMD > test_${suffix}.log || _die "running etc/tune" $?
|
||||
else
|
||||
_make "$1" "$2" "test"
|
||||
_make "$1" "$2" "test" "$3" "$4"
|
||||
echo -e "\rRun test $1 $2 inside valgrind"
|
||||
$_timeout $VALGRIND_BIN $VALGRIND_OPTS ./test > test_${suffix}.log || _die "running tests" $?
|
||||
fi
|
||||
@ -301,6 +303,11 @@ do
|
||||
--symbols)
|
||||
CHECK_SYMBOLS="1"
|
||||
;;
|
||||
--multithread)
|
||||
CFLAGS="$CFLAGS -DLTM_TEST_MULTITHREAD"
|
||||
LFLAGS="$LFLAGS -pthread"
|
||||
LDFLAGS="$LDFLAGS -pthread"
|
||||
;;
|
||||
--all)
|
||||
COMPILERS="gcc clang"
|
||||
ARCHFLAGS="-m64 -m32 -mx32"
|
||||
@ -376,9 +383,9 @@ then
|
||||
_banner "$CC"
|
||||
if [[ "$VALGRIND_BIN" != "" ]]
|
||||
then
|
||||
_runvalgrind "$CC" ""
|
||||
_runvalgrind "$CC" "" "$LFLAGS" "$LDFLAGS"
|
||||
else
|
||||
_runtest "$CC" ""
|
||||
_runtest "$CC" "" "$LFLAGS" "$LDFLAGS"
|
||||
fi
|
||||
_exit
|
||||
fi
|
||||
@ -398,9 +405,9 @@ _banner
|
||||
if [[ "$TEST_VS_MTEST" != "" ]]
|
||||
then
|
||||
make clean > /dev/null
|
||||
_make "${compilers[0]}" "${archflags[0]} $CFLAGS" "mtest_opponent"
|
||||
_make "${compilers[0]}" "${archflags[0]} $CFLAGS" "mtest_opponent" "$LFLAGS" "$LDFLAGS"
|
||||
echo
|
||||
_make "gcc" "$MTEST_RAND" "mtest"
|
||||
_make "gcc" "$MTEST_RAND" "mtest" "$LFLAGS" "$LDFLAGS"
|
||||
echo
|
||||
echo "Run test vs. mtest for $TEST_VS_MTEST iterations"
|
||||
_timeout=""
|
||||
@ -429,15 +436,15 @@ do
|
||||
fi
|
||||
if [[ "$VALGRIND_BIN" != "" ]]
|
||||
then
|
||||
_runvalgrind "$i" "$a $CFLAGS"
|
||||
_runvalgrind "$i" "$a $CFLAGS" "$LFLAGS" "$LDFLAGS"
|
||||
[ "$WITH_LOW_MP" != "1" ] && continue
|
||||
_runvalgrind "$i" "$a -DMP_16BIT $CFLAGS"
|
||||
_runvalgrind "$i" "$a -DMP_32BIT $CFLAGS"
|
||||
_runvalgrind "$i" "$a -DMP_16BIT $CFLAGS" "$LFLAGS" "$LDFLAGS"
|
||||
_runvalgrind "$i" "$a -DMP_32BIT $CFLAGS" "$LFLAGS" "$LDFLAGS"
|
||||
else
|
||||
_runtest "$i" "$a $CFLAGS"
|
||||
_runtest "$i" "$a $CFLAGS" "$LFLAGS" "$LDFLAGS"
|
||||
[ "$WITH_LOW_MP" != "1" ] && continue
|
||||
_runtest "$i" "$a -DMP_16BIT $CFLAGS"
|
||||
_runtest "$i" "$a -DMP_32BIT $CFLAGS"
|
||||
_runtest "$i" "$a -DMP_16BIT $CFLAGS" "$LFLAGS" "$LDFLAGS"
|
||||
_runtest "$i" "$a -DMP_32BIT $CFLAGS" "$LFLAGS" "$LDFLAGS"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
1
deps/libtommath/tommath.def
vendored
1
deps/libtommath/tommath.def
vendored
@ -125,6 +125,7 @@ EXPORTS
|
||||
mp_to_ubin
|
||||
mp_ubin_size
|
||||
mp_unpack
|
||||
mp_warray_free
|
||||
mp_xor
|
||||
mp_zero
|
||||
MP_MUL_KARATSUBA_CUTOFF
|
||||
|
2
deps/libtommath/tommath.h
vendored
2
deps/libtommath/tommath.h
vendored
@ -588,6 +588,8 @@ mp_err mp_fread(mp_int *a, int radix, FILE *stream) MP_WUR;
|
||||
mp_err mp_fwrite(const mp_int *a, int radix, FILE *stream) MP_WUR;
|
||||
#endif
|
||||
|
||||
int mp_warray_free(void);
|
||||
|
||||
#define mp_to_binary(M, S, N) mp_to_radix((M), (S), (N), NULL, 2)
|
||||
#define mp_to_octal(M, S, N) mp_to_radix((M), (S), (N), NULL, 8)
|
||||
#define mp_to_decimal(M, S, N) mp_to_radix((M), (S), (N), NULL, 10)
|
||||
|
5
deps/libtommath/tommath_c89.h
vendored
5
deps/libtommath/tommath_c89.h
vendored
@ -26,6 +26,11 @@ typedef __UINT8_TYPE__ mp_u8;
|
||||
typedef __UINT16_TYPE__ mp_u16;
|
||||
typedef __UINT32_TYPE__ mp_u32;
|
||||
typedef __UINT64_TYPE__ mp_u64;
|
||||
# if __WORDSIZE == 64
|
||||
typedef __UINT64_TYPE__ mp_uintptr;
|
||||
# else
|
||||
typedef __UINT32_TYPE__ mp_uintptr;
|
||||
# endif
|
||||
|
||||
/* inttypes.h replacement, printf format specifier */
|
||||
# if __WORDSIZE == 64
|
||||
|
25
deps/libtommath/tommath_class.h
vendored
25
deps/libtommath/tommath_class.h
vendored
@ -131,6 +131,7 @@
|
||||
# define MP_TO_UBIN_C
|
||||
# define MP_UBIN_SIZE_C
|
||||
# define MP_UNPACK_C
|
||||
# define MP_WARRAY_FREE_C
|
||||
# define MP_XOR_C
|
||||
# define MP_ZERO_C
|
||||
# define S_MP_ADD_C
|
||||
@ -165,6 +166,9 @@
|
||||
# define S_MP_SQR_KARATSUBA_C
|
||||
# define S_MP_SQR_TOOM_C
|
||||
# define S_MP_SUB_C
|
||||
# define S_MP_WARRAY_C
|
||||
# define S_MP_WARRAY_GET_C
|
||||
# define S_MP_WARRAY_PUT_C
|
||||
# define S_MP_ZERO_BUF_C
|
||||
# define S_MP_ZERO_DIGS_C
|
||||
#endif
|
||||
@ -957,6 +961,10 @@
|
||||
# define MP_ZERO_C
|
||||
#endif
|
||||
|
||||
#if defined(MP_WARRAY_FREE_C)
|
||||
# define S_MP_ZERO_BUF_C
|
||||
#endif
|
||||
|
||||
#if defined(MP_XOR_C)
|
||||
# define MP_CLAMP_C
|
||||
# define MP_GROW_C
|
||||
@ -1137,6 +1145,8 @@
|
||||
# define MP_CMP_MAG_C
|
||||
# define MP_GROW_C
|
||||
# define S_MP_SUB_C
|
||||
# define S_MP_WARRAY_GET_C
|
||||
# define S_MP_WARRAY_PUT_C
|
||||
# define S_MP_ZERO_BUF_C
|
||||
# define S_MP_ZERO_DIGS_C
|
||||
#endif
|
||||
@ -1165,6 +1175,8 @@
|
||||
#if defined(S_MP_MUL_COMBA_C)
|
||||
# define MP_CLAMP_C
|
||||
# define MP_GROW_C
|
||||
# define S_MP_WARRAY_GET_C
|
||||
# define S_MP_WARRAY_PUT_C
|
||||
# define S_MP_ZERO_DIGS_C
|
||||
#endif
|
||||
|
||||
@ -1179,6 +1191,8 @@
|
||||
#if defined(S_MP_MUL_HIGH_COMBA_C)
|
||||
# define MP_CLAMP_C
|
||||
# define MP_GROW_C
|
||||
# define S_MP_WARRAY_GET_C
|
||||
# define S_MP_WARRAY_PUT_C
|
||||
# define S_MP_ZERO_DIGS_C
|
||||
#endif
|
||||
|
||||
@ -1244,6 +1258,8 @@
|
||||
#if defined(S_MP_SQR_COMBA_C)
|
||||
# define MP_CLAMP_C
|
||||
# define MP_GROW_C
|
||||
# define S_MP_WARRAY_GET_C
|
||||
# define S_MP_WARRAY_PUT_C
|
||||
# define S_MP_ZERO_DIGS_C
|
||||
#endif
|
||||
|
||||
@ -1279,6 +1295,15 @@
|
||||
# define S_MP_ZERO_DIGS_C
|
||||
#endif
|
||||
|
||||
#if defined(S_MP_WARRAY_C)
|
||||
#endif
|
||||
|
||||
#if defined(S_MP_WARRAY_GET_C)
|
||||
#endif
|
||||
|
||||
#if defined(S_MP_WARRAY_PUT_C)
|
||||
#endif
|
||||
|
||||
#if defined(S_MP_ZERO_BUF_C)
|
||||
#endif
|
||||
|
||||
|
48
deps/libtommath/tommath_private.h
vendored
48
deps/libtommath/tommath_private.h
vendored
@ -160,8 +160,13 @@ MP_STATIC_ASSERT(correct_word_size, sizeof(mp_word) == (2u * sizeof(mp_digit)))
|
||||
* - Must be large enough such that the mp_set_u64 setter can
|
||||
* store uint64_t in the mp_int without growing
|
||||
*/
|
||||
#define MP_MIN_DIGIT_COUNT MP_MAX(3, (((int)MP_SIZEOF_BITS(uint64_t) + MP_DIGIT_BIT) - 1) / MP_DIGIT_BIT)
|
||||
#ifndef MP_MIN_DIGIT_COUNT
|
||||
# define MP_MIN_DIGIT_COUNT MP_MAX(3, (((int)MP_SIZEOF_BITS(uint64_t) + MP_DIGIT_BIT) - 1) / MP_DIGIT_BIT)
|
||||
#endif
|
||||
MP_STATIC_ASSERT(prec_geq_min_prec, MP_DEFAULT_DIGIT_COUNT >= MP_MIN_DIGIT_COUNT)
|
||||
MP_STATIC_ASSERT(min_prec_geq_3, MP_MIN_DIGIT_COUNT >= 3)
|
||||
MP_STATIC_ASSERT(min_prec_geq_uint64size,
|
||||
MP_MIN_DIGIT_COUNT >= ((((int)MP_SIZEOF_BITS(uint64_t) + MP_DIGIT_BIT) - 1) / MP_DIGIT_BIT))
|
||||
|
||||
/* Maximum number of digits.
|
||||
* - Must be small enough such that mp_bit_count does not overflow.
|
||||
@ -229,6 +234,47 @@ MP_PRIVATE mp_err s_mp_radix_size_overestimate(const mp_int *a, const int radix,
|
||||
MP_PRIVATE mp_err s_mp_fp_log(const mp_int *a, mp_int *c) MP_WUR;
|
||||
MP_PRIVATE mp_err s_mp_fp_log_d(const mp_int *a, mp_word *c) MP_WUR;
|
||||
|
||||
#ifdef MP_SMALL_STACK_SIZE
|
||||
|
||||
#if defined(__GNUC__)
|
||||
/* We use TLS (Thread Local Storage) to manage the instance of the WARRAY
|
||||
* per thread.
|
||||
* The compilers we're usually looking at are GCC, Clang and MSVC.
|
||||
* Both GCC and Clang are straight-forward with TLS, so it's enabled there.
|
||||
* Using MSVC the tests were OK with the static library, but failed when
|
||||
* the library was built as a DLL. As a result we completely disable
|
||||
* support for MSVC.
|
||||
* If your compiler can handle TLS properly without too much hocus pocus,
|
||||
* feel free to open a PR to add support for it.
|
||||
*/
|
||||
#define mp_thread __thread
|
||||
#else
|
||||
#error "MP_SMALL_STACK_SIZE not supported with your compiler"
|
||||
#endif
|
||||
|
||||
#define MP_SMALL_STACK_SIZE_C
|
||||
#define MP_ALLOC_WARRAY(name) *name = s_mp_warray_get()
|
||||
#define MP_FREE_WARRAY(name) s_mp_warray_put(name)
|
||||
#define MP_CHECK_WARRAY(name) do { if ((name) == NULL) { return MP_MEM; } } while(0)
|
||||
#else
|
||||
#define MP_ALLOC_WARRAY(name) name[MP_WARRAY]
|
||||
#define MP_FREE_WARRAY(name)
|
||||
#define MP_CHECK_WARRAY(name)
|
||||
#endif
|
||||
|
||||
#ifndef mp_thread
|
||||
#define mp_thread
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
void *w_free, *w_used;
|
||||
} st_warray;
|
||||
|
||||
extern MP_PRIVATE mp_thread st_warray s_mp_warray;
|
||||
|
||||
MP_PRIVATE void *s_mp_warray_get(void);
|
||||
MP_PRIVATE void s_mp_warray_put(void *w);
|
||||
|
||||
#define MP_RADIX_MAP_REVERSE_SIZE 80u
|
||||
extern MP_PRIVATE const char s_mp_radix_map[];
|
||||
extern MP_PRIVATE const uint8_t s_mp_radix_map_reverse[];
|
||||
|
2
deps/libtommath/tommath_superclass.h
vendored
2
deps/libtommath/tommath_superclass.h
vendored
@ -42,6 +42,8 @@
|
||||
# define MP_SBIN_SIZE_C
|
||||
# define MP_TO_RADIX_C
|
||||
# define MP_TO_SBIN_C
|
||||
# define MP_WARRAY_FREE_C
|
||||
# define MP_WARRAY_INIT_C
|
||||
# define S_MP_RAND_JENKINS_C
|
||||
# define S_MP_RAND_PLATFORM_C
|
||||
#endif
|
||||
|
6
deps/rapidjson/include/rapidjson/schema.h
vendored
6
deps/rapidjson/include/rapidjson/schema.h
vendored
@ -367,7 +367,9 @@ public:
|
||||
uint64_t h = Hash(0, kObjectType);
|
||||
uint64_t* kv = stack_.template Pop<uint64_t>(memberCount * 2);
|
||||
for (SizeType i = 0; i < memberCount; i++)
|
||||
h ^= Hash(kv[i * 2], kv[i * 2 + 1]); // Use xor to achieve member order insensitive
|
||||
// Issue #2205
|
||||
// Hasing the key to avoid key=value cases with bug-prone zero-value hash
|
||||
h ^= Hash(Hash(0, kv[i * 2]), kv[i * 2 + 1]); // Use xor to achieve member order insensitive
|
||||
*stack_.template Push<uint64_t>() = h;
|
||||
return true;
|
||||
}
|
||||
@ -405,7 +407,7 @@ private:
|
||||
|
||||
bool WriteBuffer(Type type, const void* data, size_t len) {
|
||||
// FNV-1a from http://isthe.com/chongo/tech/comp/fnv/
|
||||
uint64_t h = Hash(RAPIDJSON_UINT64_C2(0x84222325, 0xcbf29ce4), type);
|
||||
uint64_t h = Hash(RAPIDJSON_UINT64_C2(0xcbf29ce4, 0x84222325), type);
|
||||
const unsigned char* d = static_cast<const unsigned char*>(data);
|
||||
for (size_t i = 0; i < len; i++)
|
||||
h = Hash(h, d[i]);
|
||||
|
2
deps/rapidjson/include/rapidjson/writer.h
vendored
2
deps/rapidjson/include/rapidjson/writer.h
vendored
@ -349,7 +349,7 @@ protected:
|
||||
|
||||
bool WriteDouble(double d) {
|
||||
if (internal::Double(d).IsNanOrInf()) {
|
||||
if (!(writeFlags & kWriteNanAndInfFlag))
|
||||
if (!(writeFlags & kWriteNanAndInfFlag) && !(writeFlags & kWriteNanAndInfNullFlag))
|
||||
return false;
|
||||
if (writeFlags & kWriteNanAndInfNullFlag) {
|
||||
PutReserve(*os_, 4);
|
||||
|
5
deps/rapidjson/test/unittest/schematest.cpp
vendored
5
deps/rapidjson/test/unittest/schematest.cpp
vendored
@ -99,6 +99,9 @@ TEST(SchemaValidator, Hasher) {
|
||||
TEST_HASHER("{\"a\":1}", "{\"a\":1}", true);
|
||||
TEST_HASHER("{\"a\":1}", "{\"b\":1}", false);
|
||||
TEST_HASHER("{\"a\":1}", "{\"a\":2}", false);
|
||||
TEST_HASHER("{\"a\":\"a\"}", "{\"b\":\"b\"}", false); // Key equals value hashing
|
||||
TEST_HASHER("{\"a\":\"a\", \"b\":\"b\"}", "{\"c\":\"c\", \"d\":\"d\"}", false);
|
||||
TEST_HASHER("{\"a\":\"a\"}", "{\"b\":\"b\", \"c\":\"c\"}", false);
|
||||
TEST_HASHER("{\"a\":1, \"b\":2}", "{\"b\":2, \"a\":1}", true); // Member order insensitive
|
||||
TEST_HASHER("{}", "null", false);
|
||||
TEST_HASHER("{}", "false", false);
|
||||
@ -2282,7 +2285,7 @@ TEST(SchemaValidator, TestSuite) {
|
||||
MemoryPoolAllocator<>::Free(json);
|
||||
jsonAllocator.Clear();
|
||||
}
|
||||
printf("%d / %d passed (%2d%%)\n", passCount, testCount, passCount * 100 / testCount);
|
||||
printf("%u / %u passed (%2u%%)\n", passCount, testCount, passCount * 100 / testCount);
|
||||
if (passCount != testCount)
|
||||
ADD_FAILURE();
|
||||
}
|
||||
|
30
deps/rapidjson/test/unittest/writertest.cpp
vendored
30
deps/rapidjson/test/unittest/writertest.cpp
vendored
@ -500,6 +500,18 @@ TEST(Writer, NaN) {
|
||||
EXPECT_FALSE(writer2.Double(nan));
|
||||
}
|
||||
|
||||
TEST(Writer, NaNToNull) {
|
||||
double nan = std::numeric_limits<double>::quiet_NaN();
|
||||
|
||||
EXPECT_TRUE(internal::Double(nan).IsNan());
|
||||
{
|
||||
StringBuffer buffer;
|
||||
Writer<StringBuffer, UTF8<>, UTF8<>, CrtAllocator, kWriteNanAndInfNullFlag> writer(buffer);
|
||||
EXPECT_TRUE(writer.Double(nan));
|
||||
EXPECT_STREQ("null", buffer.GetString());
|
||||
}
|
||||
}
|
||||
|
||||
TEST(Writer, Inf) {
|
||||
double inf = std::numeric_limits<double>::infinity();
|
||||
|
||||
@ -524,6 +536,24 @@ TEST(Writer, Inf) {
|
||||
EXPECT_STREQ("Infinity-Infinity", buffer.GetString());
|
||||
}
|
||||
|
||||
TEST(Writer, InfToNull) {
|
||||
double inf = std::numeric_limits<double>::infinity();
|
||||
|
||||
EXPECT_TRUE(internal::Double(inf).IsInf());
|
||||
{
|
||||
StringBuffer buffer;
|
||||
Writer<StringBuffer, UTF8<>, UTF8<>, CrtAllocator, kWriteNanAndInfNullFlag> writer(buffer);
|
||||
EXPECT_TRUE(writer.Double(inf));
|
||||
EXPECT_STREQ("null", buffer.GetString());
|
||||
}
|
||||
{
|
||||
StringBuffer buffer;
|
||||
Writer<StringBuffer, UTF8<>, UTF8<>, CrtAllocator, kWriteNanAndInfNullFlag> writer(buffer);
|
||||
EXPECT_TRUE(writer.Double(-inf));
|
||||
EXPECT_STREQ("null", buffer.GetString());
|
||||
}
|
||||
}
|
||||
|
||||
TEST(Writer, RawValue) {
|
||||
StringBuffer buffer;
|
||||
Writer<StringBuffer> writer(buffer);
|
||||
|
4
deps/zlib/contrib/infback9/inftree9.h
vendored
4
deps/zlib/contrib/infback9/inftree9.h
vendored
@ -41,8 +41,8 @@ typedef struct {
|
||||
examples/enough.c found in the zlib distribution. The arguments to that
|
||||
program are the number of symbols, the initial root table size, and the
|
||||
maximum bit length of a code. "enough 286 9 15" for literal/length codes
|
||||
returns returns 852, and "enough 32 6 15" for distance codes returns 594.
|
||||
The initial root table size (9 or 6) is found in the fifth argument of the
|
||||
returns 852, and "enough 32 6 15" for distance codes returns 594. The
|
||||
initial root table size (9 or 6) is found in the fifth argument of the
|
||||
inflate_table() calls in infback9.c. If the root table size is changed,
|
||||
then these maximum sizes would be need to be recalculated and updated. */
|
||||
#define ENOUGH_LENS 852
|
||||
|
2
deps/zlib/contrib/minizip/ioapi.h
vendored
2
deps/zlib/contrib/minizip/ioapi.h
vendored
@ -144,7 +144,7 @@ typedef long (ZCALLBACK *tell_file_func) (voidpf opaque, voidpf stream)
|
||||
typedef long (ZCALLBACK *seek_file_func) (voidpf opaque, voidpf stream, uLong offset, int origin);
|
||||
|
||||
|
||||
/* here is the "old" 32 bits structure structure */
|
||||
/* here is the "old" 32 bits structure */
|
||||
typedef struct zlib_filefunc_def_s
|
||||
{
|
||||
open_file_func zopen_file;
|
||||
|
2
deps/zlib/contrib/minizip/miniunz.c
vendored
2
deps/zlib/contrib/minizip/miniunz.c
vendored
@ -186,7 +186,7 @@ static int makedir(const char *newdir) {
|
||||
}
|
||||
|
||||
static void do_banner(void) {
|
||||
printf("MiniUnz 1.01b, demo of zLib + Unz package written by Gilles Vollant\n");
|
||||
printf("MiniUnz 1.1, demo of zLib + Unz package written by Gilles Vollant\n");
|
||||
printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n");
|
||||
}
|
||||
|
||||
|
6
deps/zlib/contrib/minizip/zip.c
vendored
6
deps/zlib/contrib/minizip/zip.c
vendored
@ -614,9 +614,9 @@ local int LoadCentralDirectoryRecord(zip64_internal* pziinit) {
|
||||
ZPOS64_T central_pos;
|
||||
uLong uL;
|
||||
|
||||
uLong number_disk; /* number of the current dist, used for
|
||||
uLong number_disk; /* number of the current disk, used for
|
||||
spanning ZIP, unsupported, always 0*/
|
||||
uLong number_disk_with_CD; /* number the the disk with central dir, used
|
||||
uLong number_disk_with_CD; /* number of the disk with central dir, used
|
||||
for spanning ZIP, unsupported, always 0*/
|
||||
ZPOS64_T number_entry;
|
||||
ZPOS64_T number_entry_CD; /* total number of entries in
|
||||
@ -1872,7 +1872,7 @@ extern int ZEXPORT zipClose(zipFile file, const char* global_comment) {
|
||||
free_linkedlist(&(zi->central_dir));
|
||||
|
||||
pos = centraldir_pos_inzip - zi->add_position_when_writing_offset;
|
||||
if(pos >= 0xffffffff || zi->number_entry > 0xFFFF)
|
||||
if(pos >= 0xffffffff || zi->number_entry >= 0xFFFF)
|
||||
{
|
||||
ZPOS64_T Zip64EOCDpos = ZTELL64(zi->z_filefunc,zi->filestream);
|
||||
Write_Zip64EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip);
|
||||
|
4
deps/zlib/contrib/minizip/zip.h
vendored
4
deps/zlib/contrib/minizip/zip.h
vendored
@ -177,9 +177,9 @@ extern int ZEXPORT zipOpenNewFileInZip64(zipFile file,
|
||||
filename : the filename in zip (if NULL, '-' without quote will be used
|
||||
*zipfi contain supplemental information
|
||||
if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local
|
||||
contains the extrafield data the the local header
|
||||
contains the extrafield data for the local header
|
||||
if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global
|
||||
contains the extrafield data the the local header
|
||||
contains the extrafield data for the global header
|
||||
if comment != NULL, comment contain the comment string
|
||||
method contain the compression method (0 for store, Z_DEFLATED for deflate)
|
||||
level contain the level of compression (can be Z_DEFAULT_COMPRESSION)
|
||||
|
21
deps/zlib/deflate.c
vendored
21
deps/zlib/deflate.c
vendored
@ -493,7 +493,11 @@ int ZEXPORT deflateInit2_(z_streamp strm, int level, int method,
|
||||
* symbols from which it is being constructed.
|
||||
*/
|
||||
|
||||
#ifdef LIT_MEM
|
||||
s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, 5);
|
||||
#else
|
||||
s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, 4);
|
||||
#endif
|
||||
s->pending_buf_size = (ulg)s->lit_bufsize * 4;
|
||||
|
||||
if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
|
||||
@ -503,8 +507,14 @@ int ZEXPORT deflateInit2_(z_streamp strm, int level, int method,
|
||||
deflateEnd (strm);
|
||||
return Z_MEM_ERROR;
|
||||
}
|
||||
#ifdef LIT_MEM
|
||||
s->d_buf = (ushf *)(s->pending_buf + (s->lit_bufsize << 1));
|
||||
s->l_buf = s->pending_buf + (s->lit_bufsize << 2);
|
||||
s->sym_end = s->lit_bufsize - 1;
|
||||
#else
|
||||
s->sym_buf = s->pending_buf + s->lit_bufsize;
|
||||
s->sym_end = (s->lit_bufsize - 1) * 3;
|
||||
#endif
|
||||
/* We avoid equality with lit_bufsize*3 because of wraparound at 64K
|
||||
* on 16 bit machines and because stored blocks are restricted to
|
||||
* 64K-1 bytes.
|
||||
@ -720,9 +730,15 @@ int ZEXPORT deflatePrime(z_streamp strm, int bits, int value) {
|
||||
|
||||
if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
s = strm->state;
|
||||
#ifdef LIT_MEM
|
||||
if (bits < 0 || bits > 16 ||
|
||||
(uchf *)s->d_buf < s->pending_out + ((Buf_size + 7) >> 3))
|
||||
return Z_BUF_ERROR;
|
||||
#else
|
||||
if (bits < 0 || bits > 16 ||
|
||||
s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3))
|
||||
return Z_BUF_ERROR;
|
||||
#endif
|
||||
do {
|
||||
put = Buf_size - s->bi_valid;
|
||||
if (put > bits)
|
||||
@ -1308,7 +1324,12 @@ int ZEXPORT deflateCopy(z_streamp dest, z_streamp source) {
|
||||
zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
|
||||
|
||||
ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
|
||||
#ifdef LIT_MEM
|
||||
ds->d_buf = (ushf *)(ds->pending_buf + (ds->lit_bufsize << 1));
|
||||
ds->l_buf = ds->pending_buf + (ds->lit_bufsize << 2);
|
||||
#else
|
||||
ds->sym_buf = ds->pending_buf + ds->lit_bufsize;
|
||||
#endif
|
||||
|
||||
ds->l_desc.dyn_tree = ds->dyn_ltree;
|
||||
ds->d_desc.dyn_tree = ds->dyn_dtree;
|
||||
|
31
deps/zlib/deflate.h
vendored
31
deps/zlib/deflate.h
vendored
@ -23,6 +23,10 @@
|
||||
# define GZIP
|
||||
#endif
|
||||
|
||||
/* define LIT_MEM to slightly increase the speed of deflate (order 1% to 2%) at
|
||||
the cost of a larger memory footprint */
|
||||
/* #define LIT_MEM */
|
||||
|
||||
/* ===========================================================================
|
||||
* Internal compression state.
|
||||
*/
|
||||
@ -217,7 +221,12 @@ typedef struct internal_state {
|
||||
/* Depth of each subtree used as tie breaker for trees of equal frequency
|
||||
*/
|
||||
|
||||
#ifdef LIT_MEM
|
||||
ushf *d_buf; /* buffer for distances */
|
||||
uchf *l_buf; /* buffer for literals/lengths */
|
||||
#else
|
||||
uchf *sym_buf; /* buffer for distances and literals/lengths */
|
||||
#endif
|
||||
|
||||
uInt lit_bufsize;
|
||||
/* Size of match buffer for literals/lengths. There are 4 reasons for
|
||||
@ -239,7 +248,7 @@ typedef struct internal_state {
|
||||
* - I can't count above 4
|
||||
*/
|
||||
|
||||
uInt sym_next; /* running index in sym_buf */
|
||||
uInt sym_next; /* running index in symbol buffer */
|
||||
uInt sym_end; /* symbol table full when sym_next reaches this */
|
||||
|
||||
ulg opt_len; /* bit length of current block with optimal trees */
|
||||
@ -318,6 +327,25 @@ void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf,
|
||||
extern const uch ZLIB_INTERNAL _dist_code[];
|
||||
#endif
|
||||
|
||||
#ifdef LIT_MEM
|
||||
# define _tr_tally_lit(s, c, flush) \
|
||||
{ uch cc = (c); \
|
||||
s->d_buf[s->sym_next] = 0; \
|
||||
s->l_buf[s->sym_next++] = cc; \
|
||||
s->dyn_ltree[cc].Freq++; \
|
||||
flush = (s->sym_next == s->sym_end); \
|
||||
}
|
||||
# define _tr_tally_dist(s, distance, length, flush) \
|
||||
{ uch len = (uch)(length); \
|
||||
ush dist = (ush)(distance); \
|
||||
s->d_buf[s->sym_next] = dist; \
|
||||
s->l_buf[s->sym_next++] = len; \
|
||||
dist--; \
|
||||
s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
|
||||
s->dyn_dtree[d_code(dist)].Freq++; \
|
||||
flush = (s->sym_next == s->sym_end); \
|
||||
}
|
||||
#else
|
||||
# define _tr_tally_lit(s, c, flush) \
|
||||
{ uch cc = (c); \
|
||||
s->sym_buf[s->sym_next++] = 0; \
|
||||
@ -337,6 +365,7 @@ void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf,
|
||||
s->dyn_dtree[d_code(dist)].Freq++; \
|
||||
flush = (s->sym_next == s->sym_end); \
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
|
||||
# define _tr_tally_dist(s, distance, length, flush) \
|
||||
|
2
deps/zlib/inflate.c
vendored
2
deps/zlib/inflate.c
vendored
@ -1387,7 +1387,7 @@ int ZEXPORT inflateSync(z_streamp strm) {
|
||||
/* if first time, start search in bit buffer */
|
||||
if (state->mode != SYNC) {
|
||||
state->mode = SYNC;
|
||||
state->hold <<= state->bits & 7;
|
||||
state->hold >>= state->bits & 7;
|
||||
state->bits -= state->bits & 7;
|
||||
len = 0;
|
||||
while (state->bits >= 8) {
|
||||
|
4
deps/zlib/inftrees.h
vendored
4
deps/zlib/inftrees.h
vendored
@ -41,8 +41,8 @@ typedef struct {
|
||||
examples/enough.c found in the zlib distribution. The arguments to that
|
||||
program are the number of symbols, the initial root table size, and the
|
||||
maximum bit length of a code. "enough 286 9 15" for literal/length codes
|
||||
returns returns 852, and "enough 30 6 15" for distance codes returns 592.
|
||||
The initial root table size (9 or 6) is found in the fifth argument of the
|
||||
returns 852, and "enough 30 6 15" for distance codes returns 592. The
|
||||
initial root table size (9 or 6) is found in the fifth argument of the
|
||||
inflate_table() calls in inflate.c and infback.c. If the root table size is
|
||||
changed, then these maximum sizes would be need to be recalculated and
|
||||
updated. */
|
||||
|
25
deps/zlib/test/example.c
vendored
25
deps/zlib/test/example.c
vendored
@ -36,12 +36,12 @@ static uLong dictId; /* Adler32 value of the dictionary */
|
||||
|
||||
#ifdef Z_SOLO
|
||||
|
||||
void *myalloc(void *q, unsigned n, unsigned m) {
|
||||
static void *myalloc(void *q, unsigned n, unsigned m) {
|
||||
(void)q;
|
||||
return calloc(n, m);
|
||||
}
|
||||
|
||||
void myfree(void *q, void *p) {
|
||||
static void myfree(void *q, void *p) {
|
||||
(void)q;
|
||||
free(p);
|
||||
}
|
||||
@ -57,7 +57,7 @@ static free_func zfree = (free_func)0;
|
||||
/* ===========================================================================
|
||||
* Test compress() and uncompress()
|
||||
*/
|
||||
void test_compress(Byte *compr, uLong comprLen, Byte *uncompr,
|
||||
static void test_compress(Byte *compr, uLong comprLen, Byte *uncompr,
|
||||
uLong uncomprLen) {
|
||||
int err;
|
||||
uLong len = (uLong)strlen(hello)+1;
|
||||
@ -81,7 +81,7 @@ void test_compress(Byte *compr, uLong comprLen, Byte *uncompr,
|
||||
/* ===========================================================================
|
||||
* Test read/write of .gz files
|
||||
*/
|
||||
void test_gzio(const char *fname, Byte *uncompr, uLong uncomprLen) {
|
||||
static void test_gzio(const char *fname, Byte *uncompr, uLong uncomprLen) {
|
||||
#ifdef NO_GZCOMPRESS
|
||||
fprintf(stderr, "NO_GZCOMPRESS -- gz* functions cannot compress\n");
|
||||
#else
|
||||
@ -163,7 +163,7 @@ void test_gzio(const char *fname, Byte *uncompr, uLong uncomprLen) {
|
||||
/* ===========================================================================
|
||||
* Test deflate() with small buffers
|
||||
*/
|
||||
void test_deflate(Byte *compr, uLong comprLen) {
|
||||
static void test_deflate(Byte *compr, uLong comprLen) {
|
||||
z_stream c_stream; /* compression stream */
|
||||
int err;
|
||||
uLong len = (uLong)strlen(hello)+1;
|
||||
@ -198,7 +198,7 @@ void test_deflate(Byte *compr, uLong comprLen) {
|
||||
/* ===========================================================================
|
||||
* Test inflate() with small buffers
|
||||
*/
|
||||
void test_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
|
||||
static void test_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
|
||||
uLong uncomprLen) {
|
||||
int err;
|
||||
z_stream d_stream; /* decompression stream */
|
||||
@ -237,7 +237,7 @@ void test_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
|
||||
/* ===========================================================================
|
||||
* Test deflate() with large buffers and dynamic change of compression level
|
||||
*/
|
||||
void test_large_deflate(Byte *compr, uLong comprLen, Byte *uncompr,
|
||||
static void test_large_deflate(Byte *compr, uLong comprLen, Byte *uncompr,
|
||||
uLong uncomprLen) {
|
||||
z_stream c_stream; /* compression stream */
|
||||
int err;
|
||||
@ -290,7 +290,7 @@ void test_large_deflate(Byte *compr, uLong comprLen, Byte *uncompr,
|
||||
/* ===========================================================================
|
||||
* Test inflate() with large buffers
|
||||
*/
|
||||
void test_large_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
|
||||
static void test_large_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
|
||||
uLong uncomprLen) {
|
||||
int err;
|
||||
z_stream d_stream; /* decompression stream */
|
||||
@ -329,7 +329,7 @@ void test_large_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
|
||||
/* ===========================================================================
|
||||
* Test deflate() with full flush
|
||||
*/
|
||||
void test_flush(Byte *compr, uLong *comprLen) {
|
||||
static void test_flush(Byte *compr, uLong *comprLen) {
|
||||
z_stream c_stream; /* compression stream */
|
||||
int err;
|
||||
uInt len = (uInt)strlen(hello)+1;
|
||||
@ -364,7 +364,8 @@ void test_flush(Byte *compr, uLong *comprLen) {
|
||||
/* ===========================================================================
|
||||
* Test inflateSync()
|
||||
*/
|
||||
void test_sync(Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen) {
|
||||
static void test_sync(Byte *compr, uLong comprLen, Byte *uncompr,
|
||||
uLong uncomprLen) {
|
||||
int err;
|
||||
z_stream d_stream; /* decompression stream */
|
||||
|
||||
@ -404,7 +405,7 @@ void test_sync(Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen) {
|
||||
/* ===========================================================================
|
||||
* Test deflate() with preset dictionary
|
||||
*/
|
||||
void test_dict_deflate(Byte *compr, uLong comprLen) {
|
||||
static void test_dict_deflate(Byte *compr, uLong comprLen) {
|
||||
z_stream c_stream; /* compression stream */
|
||||
int err;
|
||||
|
||||
@ -438,7 +439,7 @@ void test_dict_deflate(Byte *compr, uLong comprLen) {
|
||||
/* ===========================================================================
|
||||
* Test inflate() with a preset dictionary
|
||||
*/
|
||||
void test_dict_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
|
||||
static void test_dict_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
|
||||
uLong uncomprLen) {
|
||||
int err;
|
||||
z_stream d_stream; /* decompression stream */
|
||||
|
30
deps/zlib/test/minigzip.c
vendored
30
deps/zlib/test/minigzip.c
vendored
@ -149,12 +149,12 @@ static void pwinerror (s)
|
||||
# include <unistd.h> /* for unlink() */
|
||||
#endif
|
||||
|
||||
void *myalloc(void *q, unsigned n, unsigned m) {
|
||||
static void *myalloc(void *q, unsigned n, unsigned m) {
|
||||
(void)q;
|
||||
return calloc(n, m);
|
||||
}
|
||||
|
||||
void myfree(void *q, void *p) {
|
||||
static void myfree(void *q, void *p) {
|
||||
(void)q;
|
||||
free(p);
|
||||
}
|
||||
@ -167,7 +167,7 @@ typedef struct gzFile_s {
|
||||
z_stream strm;
|
||||
} *gzFile;
|
||||
|
||||
gzFile gz_open(const char *path, int fd, const char *mode) {
|
||||
static gzFile gz_open(const char *path, int fd, const char *mode) {
|
||||
gzFile gz;
|
||||
int ret;
|
||||
|
||||
@ -201,15 +201,15 @@ gzFile gz_open(const char *path, int fd, const char *mode) {
|
||||
return gz;
|
||||
}
|
||||
|
||||
gzFile gzopen(const char *path, const char *mode) {
|
||||
static gzFile gzopen(const char *path, const char *mode) {
|
||||
return gz_open(path, -1, mode);
|
||||
}
|
||||
|
||||
gzFile gzdopen(int fd, const char *mode) {
|
||||
static gzFile gzdopen(int fd, const char *mode) {
|
||||
return gz_open(NULL, fd, mode);
|
||||
}
|
||||
|
||||
int gzwrite(gzFile gz, const void *buf, unsigned len) {
|
||||
static int gzwrite(gzFile gz, const void *buf, unsigned len) {
|
||||
z_stream *strm;
|
||||
unsigned char out[BUFLEN];
|
||||
|
||||
@ -227,7 +227,7 @@ int gzwrite(gzFile gz, const void *buf, unsigned len) {
|
||||
return len;
|
||||
}
|
||||
|
||||
int gzread(gzFile gz, void *buf, unsigned len) {
|
||||
static int gzread(gzFile gz, void *buf, unsigned len) {
|
||||
int ret;
|
||||
unsigned got;
|
||||
unsigned char in[1];
|
||||
@ -258,7 +258,7 @@ int gzread(gzFile gz, void *buf, unsigned len) {
|
||||
return len - strm->avail_out;
|
||||
}
|
||||
|
||||
int gzclose(gzFile gz) {
|
||||
static int gzclose(gzFile gz) {
|
||||
z_stream *strm;
|
||||
unsigned char out[BUFLEN];
|
||||
|
||||
@ -283,7 +283,7 @@ int gzclose(gzFile gz) {
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
const char *gzerror(gzFile gz, int *err) {
|
||||
static const char *gzerror(gzFile gz, int *err) {
|
||||
*err = gz->err;
|
||||
return gz->msg;
|
||||
}
|
||||
@ -295,7 +295,7 @@ static char *prog;
|
||||
/* ===========================================================================
|
||||
* Display error message and exit
|
||||
*/
|
||||
void error(const char *msg) {
|
||||
static void error(const char *msg) {
|
||||
fprintf(stderr, "%s: %s\n", prog, msg);
|
||||
exit(1);
|
||||
}
|
||||
@ -305,7 +305,7 @@ void error(const char *msg) {
|
||||
/* Try compressing the input file at once using mmap. Return Z_OK if
|
||||
* if success, Z_ERRNO otherwise.
|
||||
*/
|
||||
int gz_compress_mmap(FILE *in, gzFile out) {
|
||||
static int gz_compress_mmap(FILE *in, gzFile out) {
|
||||
int len;
|
||||
int err;
|
||||
int ifd = fileno(in);
|
||||
@ -338,7 +338,7 @@ int gz_compress_mmap(FILE *in, gzFile out) {
|
||||
* Compress input to output then close both files.
|
||||
*/
|
||||
|
||||
void gz_compress(FILE *in, gzFile out) {
|
||||
static void gz_compress(FILE *in, gzFile out) {
|
||||
local char buf[BUFLEN];
|
||||
int len;
|
||||
int err;
|
||||
@ -366,7 +366,7 @@ void gz_compress(FILE *in, gzFile out) {
|
||||
/* ===========================================================================
|
||||
* Uncompress input to output then close both files.
|
||||
*/
|
||||
void gz_uncompress(gzFile in, FILE *out) {
|
||||
static void gz_uncompress(gzFile in, FILE *out) {
|
||||
local char buf[BUFLEN];
|
||||
int len;
|
||||
int err;
|
||||
@ -390,7 +390,7 @@ void gz_uncompress(gzFile in, FILE *out) {
|
||||
* Compress the given file: create a corresponding .gz file and remove the
|
||||
* original.
|
||||
*/
|
||||
void file_compress(char *file, char *mode) {
|
||||
static void file_compress(char *file, char *mode) {
|
||||
local char outfile[MAX_NAME_LEN];
|
||||
FILE *in;
|
||||
gzFile out;
|
||||
@ -426,7 +426,7 @@ void file_compress(char *file, char *mode) {
|
||||
/* ===========================================================================
|
||||
* Uncompress the given file and remove the original.
|
||||
*/
|
||||
void file_uncompress(char *file) {
|
||||
static void file_uncompress(char *file) {
|
||||
local char buf[MAX_NAME_LEN];
|
||||
char *infile, *outfile;
|
||||
FILE *out;
|
||||
|
18
deps/zlib/trees.c
vendored
18
deps/zlib/trees.c
vendored
@ -899,14 +899,19 @@ local void compress_block(deflate_state *s, const ct_data *ltree,
|
||||
const ct_data *dtree) {
|
||||
unsigned dist; /* distance of matched string */
|
||||
int lc; /* match length or unmatched char (if dist == 0) */
|
||||
unsigned sx = 0; /* running index in sym_buf */
|
||||
unsigned sx = 0; /* running index in symbol buffers */
|
||||
unsigned code; /* the code to send */
|
||||
int extra; /* number of extra bits to send */
|
||||
|
||||
if (s->sym_next != 0) do {
|
||||
#ifdef LIT_MEM
|
||||
dist = s->d_buf[sx];
|
||||
lc = s->l_buf[sx++];
|
||||
#else
|
||||
dist = s->sym_buf[sx++] & 0xff;
|
||||
dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8;
|
||||
lc = s->sym_buf[sx++];
|
||||
#endif
|
||||
if (dist == 0) {
|
||||
send_code(s, lc, ltree); /* send a literal byte */
|
||||
Tracecv(isgraph(lc), (stderr," '%c' ", lc));
|
||||
@ -931,8 +936,12 @@ local void compress_block(deflate_state *s, const ct_data *ltree,
|
||||
}
|
||||
} /* literal or match pair ? */
|
||||
|
||||
/* Check that the overlay between pending_buf and sym_buf is ok: */
|
||||
/* Check for no overlay of pending_buf on needed symbols */
|
||||
#ifdef LIT_MEM
|
||||
Assert(s->pending < (s->lit_bufsize << 1) + sx, "pendingBuf overflow");
|
||||
#else
|
||||
Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow");
|
||||
#endif
|
||||
|
||||
} while (sx < s->sym_next);
|
||||
|
||||
@ -1082,9 +1091,14 @@ void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf,
|
||||
* the current block must be flushed.
|
||||
*/
|
||||
int ZLIB_INTERNAL _tr_tally(deflate_state *s, unsigned dist, unsigned lc) {
|
||||
#ifdef LIT_MEM
|
||||
s->d_buf[s->sym_next] = (ush)dist;
|
||||
s->l_buf[s->sym_next++] = (uch)lc;
|
||||
#else
|
||||
s->sym_buf[s->sym_next++] = (uch)dist;
|
||||
s->sym_buf[s->sym_next++] = (uch)(dist >> 8);
|
||||
s->sym_buf[s->sym_next++] = (uch)lc;
|
||||
#endif
|
||||
if (dist == 0) {
|
||||
/* lc is the unmatched char */
|
||||
s->dyn_ltree[lc].Freq++;
|
||||
|
4
deps/zlib/win32/README-WIN32.txt
vendored
4
deps/zlib/win32/README-WIN32.txt
vendored
@ -16,8 +16,8 @@ is http://zlib.net/ . Before reporting a problem, please check this site to
|
||||
verify that you have the latest version of zlib; otherwise get the latest
|
||||
version and check whether the problem still exists or not.
|
||||
|
||||
PLEASE read DLL_FAQ.txt, and the the zlib FAQ http://zlib.net/zlib_faq.html
|
||||
before asking for help.
|
||||
PLEASE read DLL_FAQ.txt, and the zlib FAQ http://zlib.net/zlib_faq.html before
|
||||
asking for help.
|
||||
|
||||
|
||||
Manifest:
|
||||
|
8
deps/zlib/zlib.h
vendored
8
deps/zlib/zlib.h
vendored
@ -936,10 +936,10 @@ ZEXTERN int ZEXPORT inflateSync(z_streamp strm);
|
||||
inflateSync returns Z_OK if a possible full flush point has been found,
|
||||
Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point
|
||||
has been found, or Z_STREAM_ERROR if the stream structure was inconsistent.
|
||||
In the success case, the application may save the current current value of
|
||||
total_in which indicates where valid compressed data was found. In the
|
||||
error case, the application may repeatedly call inflateSync, providing more
|
||||
input each time, until success or end of the input data.
|
||||
In the success case, the application may save the current value of total_in
|
||||
which indicates where valid compressed data was found. In the error case,
|
||||
the application may repeatedly call inflateSync, providing more input each
|
||||
time, until success or end of the input data.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT inflateCopy(z_streamp dest,
|
||||
|
@ -1,4 +1,4 @@
|
||||
gitVersioningCommand = "git describe --tags --dirty --always"
|
||||
gitVersioningCommand = "git describe --tags --always"
|
||||
gitCurrentBranchCommand = "git symbolic-ref -q --short HEAD"
|
||||
|
||||
-- Quote the given string input as a C string
|
||||
|
@ -30,6 +30,8 @@ namespace Components
|
||||
std::uint16_t lastAltWeapon;
|
||||
std::uint8_t meleeDist;
|
||||
float meleeYaw;
|
||||
std::int8_t remoteAngles[2];
|
||||
float angles[3];
|
||||
bool active;
|
||||
};
|
||||
|
||||
@ -54,10 +56,11 @@ namespace Components
|
||||
{ "sprint", Game::CMD_BUTTON_SPRINT },
|
||||
{ "leanleft", Game::CMD_BUTTON_LEAN_LEFT },
|
||||
{ "leanright", Game::CMD_BUTTON_LEAN_RIGHT },
|
||||
{ "ads", Game::CMD_BUTTON_ADS },
|
||||
{ "ads", Game::CMD_BUTTON_ADS | Game::CMD_BUTTON_THROW },
|
||||
{ "holdbreath", Game::CMD_BUTTON_BREATH },
|
||||
{ "usereload", Game::CMD_BUTTON_USE_RELOAD },
|
||||
{ "activate", Game::CMD_BUTTON_ACTIVATE },
|
||||
{ "remote", Game::CMD_BUTTON_REMOTE },
|
||||
};
|
||||
|
||||
void Bots::UpdateBotNames()
|
||||
@ -214,7 +217,10 @@ namespace Components
|
||||
}
|
||||
|
||||
ZeroMemory(&g_botai[entref.entnum], sizeof(BotMovementInfo));
|
||||
g_botai[entref.entnum].weapon = 1;
|
||||
g_botai[entref.entnum].weapon = static_cast<std::uint16_t>(ent->client->ps.weapCommon.weapon);
|
||||
g_botai[entref.entnum].angles[0] = ent->client->ps.viewangles[0];
|
||||
g_botai[entref.entnum].angles[1] = ent->client->ps.viewangles[1];
|
||||
g_botai[entref.entnum].angles[2] = ent->client->ps.viewangles[2];
|
||||
g_botai[entref.entnum].active = true;
|
||||
});
|
||||
|
||||
@ -311,6 +317,43 @@ namespace Components
|
||||
g_botai[entref.entnum].meleeDist = static_cast<int8_t>(dist);
|
||||
g_botai[entref.entnum].active = true;
|
||||
});
|
||||
|
||||
GSC::Script::AddMethod("BotRemoteAngles", [](const Game::scr_entref_t entref) // Usage: <bot> BotRemoteAngles(<int>, <int>);
|
||||
{
|
||||
const auto* ent = GSC::Script::Scr_GetPlayerEntity(entref);
|
||||
if (!Game::SV_IsTestClient(ent->s.number))
|
||||
{
|
||||
Game::Scr_Error("BotRemoteAngles: Can only call on a bot!");
|
||||
return;
|
||||
}
|
||||
|
||||
const auto pitch = std::clamp<int>(Game::Scr_GetInt(0), std::numeric_limits<char>::min(), std::numeric_limits<char>::max());
|
||||
const auto yaw = std::clamp<int>(Game::Scr_GetInt(1), std::numeric_limits<char>::min(), std::numeric_limits<char>::max());
|
||||
|
||||
g_botai[entref.entnum].remoteAngles[0] = static_cast<int8_t>(pitch);
|
||||
g_botai[entref.entnum].remoteAngles[1] = static_cast<int8_t>(yaw);
|
||||
g_botai[entref.entnum].active = true;
|
||||
});
|
||||
|
||||
GSC::Script::AddMethod("BotAngles", [](const Game::scr_entref_t entref) // Usage: <bot> BotAngles(<float>, <float>, <float>);
|
||||
{
|
||||
const auto* ent = GSC::Script::Scr_GetPlayerEntity(entref);
|
||||
if (!Game::SV_IsTestClient(ent->s.number))
|
||||
{
|
||||
Game::Scr_Error("BotAngles: Can only call on a bot!");
|
||||
return;
|
||||
}
|
||||
|
||||
const auto pitch = Game::Scr_GetFloat(0);
|
||||
const auto yaw = Game::Scr_GetFloat(1);
|
||||
const auto roll = Game::Scr_GetFloat(2);
|
||||
|
||||
g_botai[entref.entnum].angles[0] = pitch;
|
||||
g_botai[entref.entnum].angles[1] = yaw;
|
||||
g_botai[entref.entnum].angles[2] = roll;
|
||||
|
||||
g_botai[entref.entnum].active = true;
|
||||
});
|
||||
}
|
||||
|
||||
void Bots::BotAiAction(Game::client_s* cl)
|
||||
@ -341,10 +384,12 @@ namespace Components
|
||||
userCmd.primaryWeaponForAltMode = g_botai[clientNum].lastAltWeapon;
|
||||
userCmd.meleeChargeYaw = g_botai[clientNum].meleeYaw;
|
||||
userCmd.meleeChargeDist = g_botai[clientNum].meleeDist;
|
||||
userCmd.remoteControlAngles[0] = g_botai[clientNum].remoteAngles[0];
|
||||
userCmd.remoteControlAngles[1] = g_botai[clientNum].remoteAngles[1];
|
||||
|
||||
userCmd.angles[0] = ANGLE2SHORT((cl->gentity->client->ps.viewangles[0] - cl->gentity->client->ps.delta_angles[0]));
|
||||
userCmd.angles[1] = ANGLE2SHORT((cl->gentity->client->ps.viewangles[1] - cl->gentity->client->ps.delta_angles[1]));
|
||||
userCmd.angles[2] = ANGLE2SHORT((cl->gentity->client->ps.viewangles[2] - cl->gentity->client->ps.delta_angles[2]));
|
||||
userCmd.angles[0] = ANGLE2SHORT(g_botai[clientNum].angles[0] - cl->gentity->client->ps.delta_angles[0]);
|
||||
userCmd.angles[1] = ANGLE2SHORT(g_botai[clientNum].angles[1] - cl->gentity->client->ps.delta_angles[1]);
|
||||
userCmd.angles[2] = ANGLE2SHORT(g_botai[clientNum].angles[2] - cl->gentity->client->ps.delta_angles[2]);
|
||||
|
||||
Game::SV_ClientThink(cl, &userCmd);
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ namespace Components
|
||||
#ifdef EXPERIMENTAL_BUILD
|
||||
return REVISION_STR "-develop latest " __DATE__ " " __TIME__;
|
||||
#else
|
||||
return REVISION_STR " latest " __DATE__ " " __TIME__;
|
||||
return; // Ahrimdon
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -100,16 +100,19 @@ namespace Components
|
||||
{
|
||||
RegisterBrandingDvars();
|
||||
|
||||
//Ahrimdon
|
||||
/*
|
||||
// UI version string
|
||||
Utils::Hook::Set<const char*>(0x43F73B, "IW4x " REVISION_STR);
|
||||
// Utils::Hook::Set<const char*>(0x43F73B, "");
|
||||
|
||||
// Short version dvar
|
||||
Utils::Hook::Set<const char*>(0x60BD91, REVISION_STR);
|
||||
// Utils::Hook::Set<const char*>(0x60BD91, REVISION_STR);
|
||||
*/
|
||||
|
||||
// Com_Init_Try_Block_Function
|
||||
Utils::Hook::Set<const char*>(0x60BAF4, BUILD_TYPE);
|
||||
#ifdef EXPERIMENTAL_BUILD
|
||||
Utils::Hook::Set<const char*>(0x60BAEf, REVISION_STR "-develop");
|
||||
Utils::Hook::Set<const char*>(0x60BAEf, REVISION_STR "");
|
||||
#else
|
||||
Utils::Hook::Set<const char*>(0x60BAEf, REVISION_STR);
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user