Setup action build & upload
This commit is contained in:
parent
2824a307e4
commit
5d90d5269a
165
.github/workflows/ci.yml
vendored
Normal file
165
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,165 @@
|
|||||||
|
name: Extension builder
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ action, master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ action, master ]
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-20.04, windows-2019, ubuntu-latest, windows-latest]
|
||||||
|
include:
|
||||||
|
- os: ubuntu-20.04
|
||||||
|
cc: clang-10
|
||||||
|
cxx: clang++-10
|
||||||
|
- os: windows-2019
|
||||||
|
cc: msvc
|
||||||
|
- os: ubuntu-latest
|
||||||
|
cc: clang
|
||||||
|
cxx: clang++
|
||||||
|
- os: windows-latest
|
||||||
|
cc: msvc
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
|
||||||
|
name: ${{ matrix.os }} - ${{ matrix.cc }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
env:
|
||||||
|
PROJECT: 'connect'
|
||||||
|
SDKS: 'css hl2dm dods tf2'
|
||||||
|
MMSOURCE_VERSION: '1.10'
|
||||||
|
SOURCEMOD_VERSION: '1.11'
|
||||||
|
CACHE_PATH: ${{ github.workspace }}/cache
|
||||||
|
steps:
|
||||||
|
- name: Concatenate SDK Names
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
# Paranoia
|
||||||
|
SDKS_VAR="${{env.SDKS}}"
|
||||||
|
# This will be used in our cache key
|
||||||
|
echo "SDKS_KEY=${SDKS_VAR//[[:blank:]]/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Linux dependencies
|
||||||
|
if: startsWith(runner.os, 'Linux')
|
||||||
|
run: |
|
||||||
|
sudo dpkg --add-architecture i386
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y --no-install-recommends \
|
||||||
|
gcc-multilib g++-multilib libstdc++6 lib32stdc++6 \
|
||||||
|
libc6-dev libc6-dev-i386 linux-libc-dev \
|
||||||
|
linux-libc-dev:i386 lib32z1-dev ${{ matrix.cc }}
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
name: Setup Python 3.9
|
||||||
|
with:
|
||||||
|
python-version: 3.9
|
||||||
|
|
||||||
|
- name: Install Python dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip setuptools wheel
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
name: Repository checkout
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
path: extension
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
name: Cache dependencies
|
||||||
|
env:
|
||||||
|
cache-name: connect-cache
|
||||||
|
with:
|
||||||
|
path: ${{ env.CACHE_PATH }}
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-sm${{ env.SOURCEMOD_VERSION }}-mmsource${{ env.MMSOURCE_VERSION }}-${{ env.SDKS_KEY }}
|
||||||
|
|
||||||
|
- shell: bash
|
||||||
|
name: Install dependencies
|
||||||
|
run: |
|
||||||
|
mkdir -p "${{ env.CACHE_PATH }}"
|
||||||
|
cd "${{ env.CACHE_PATH }}"
|
||||||
|
shallow_checkout () {
|
||||||
|
# Param 1 is origin
|
||||||
|
# Param 2 is branch
|
||||||
|
# Param 3 is name
|
||||||
|
if [ ! -d "$3" ]; then
|
||||||
|
git clone "$1" --depth 1 --branch "$2" "$3"
|
||||||
|
fi
|
||||||
|
cd "$3"
|
||||||
|
git remote set-url origin "$1"
|
||||||
|
git fetch --depth 1 origin "$2"
|
||||||
|
git checkout --force --recurse-submodules FETCH_HEAD
|
||||||
|
git submodule init
|
||||||
|
git submodule update --depth 1
|
||||||
|
cd ..
|
||||||
|
}
|
||||||
|
# We are aware of what we are doing!
|
||||||
|
git config --global advice.detachedHead false
|
||||||
|
# Verify github cache, and see if we don't have the sdks already cloned and update them
|
||||||
|
for sdk in ${{ env.SDKS }}
|
||||||
|
do
|
||||||
|
shallow_checkout "https://github.com/alliedmodders/hl2sdk" "${sdk}" "hl2sdk-${sdk}"
|
||||||
|
done
|
||||||
|
shallow_checkout "https://github.com/alliedmodders/ambuild" "master" "ambuild"
|
||||||
|
shallow_checkout "https://github.com/alliedmodders/sourcemod" "${{env.SOURCEMOD_VERSION}}-dev" "sourcemod"
|
||||||
|
shallow_checkout "https://github.com/alliedmodders/metamod-source/" "${{env.MMSOURCE_VERSION}}-dev" "metamod-source"
|
||||||
|
# But maybe others aren't (also probably unnecessary because git actions but paranoia)
|
||||||
|
git config --global advice.detachedHead true
|
||||||
|
|
||||||
|
- name: Setup AMBuild
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd "${{ env.CACHE_PATH }}"
|
||||||
|
python -m pip install ./ambuild
|
||||||
|
|
||||||
|
- name: Select clang compiler
|
||||||
|
if: startsWith(runner.os, 'Linux')
|
||||||
|
run: |
|
||||||
|
echo "CC=${{ matrix.cc }}" >> $GITHUB_ENV
|
||||||
|
echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV
|
||||||
|
${{ matrix.cc }} --version
|
||||||
|
${{ matrix.cxx }} --version
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
shell: bash
|
||||||
|
working-directory: extension
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
python ../configure.py --enable-auto-versioning --enable-optimize --sdks="${{ env.SDKS }}" --mms-path="${{ env.CACHE_PATH }}/metamod-source" --hl2sdk-root="${{ env.CACHE_PATH }}" --sm-path="${{ env.CACHE_PATH }}/sourcemod"
|
||||||
|
ambuild
|
||||||
|
|
||||||
|
PLATFORM="${{ runner.os }}"
|
||||||
|
FILENAME="$(cat ./includes/filename_versioning.txt)"
|
||||||
|
ZIP_FILENAME="${{ env.PROJECT }}-${FILENAME}-${PLATFORM,}.zip"
|
||||||
|
|
||||||
|
echo "ZIP_FILENAME=${ZIP_FILENAME}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Package release - Windows
|
||||||
|
if: github.event_name == 'push' && github.ref == 'refs/heads/action' && startsWith(matrix.os, 'windows-latest')
|
||||||
|
working-directory: extension/build/package
|
||||||
|
run: Compress-Archive -Path * -Destination ${{ env.ZIP_FILENAME }}
|
||||||
|
|
||||||
|
- name: Package release
|
||||||
|
if: github.event_name == 'push' && github.ref == 'refs/heads/action' && startsWith(matrix.os, 'ubuntu-latest')
|
||||||
|
working-directory: extension/build/package
|
||||||
|
run: zip -r "${{ env.ZIP_FILENAME }}" .
|
||||||
|
|
||||||
|
- name: Upload release
|
||||||
|
if: github.event_name == 'push' && github.ref == 'refs/heads/action' && (startsWith(matrix.os, 'ubuntu-latest') || startsWith(matrix.os, 'windows-latest'))
|
||||||
|
shell: bash
|
||||||
|
working-directory: extension/build/package
|
||||||
|
run: |
|
||||||
|
echo "Begin upload..."
|
||||||
|
AUTHORIZATION="$(echo -n '${{ secrets.USERNAME }}:${{ secrets.PASSWORD }}' | base64)"
|
||||||
|
echo "::add-mask::${AUTHORIZATION}"
|
||||||
|
|
||||||
|
HTTP_CODE=$(curl -XPOST -H "Authorization: Basic ${AUTHORIZATION}" -H "Content-Type: application/zip" --output /dev/null --silent --write-out "%{http_code}" --data-binary "@${{ env.ZIP_FILENAME }}" "https://builds.limetech.io/upload.php?project=${{ env.PROJECT }}&branch=action&filename=${{ env.ZIP_FILENAME }}")
|
||||||
|
if test ${HTTP_CODE} -ne 200; then
|
||||||
|
exit ${HTTP_CODE}
|
||||||
|
fi
|
||||||
|
echo "Upload successful!"
|
||||||
@ -34,26 +34,25 @@ WinLinuxMac = ['windows', 'linux', 'mac']
|
|||||||
|
|
||||||
PossibleSDKs = {
|
PossibleSDKs = {
|
||||||
# 'episode1': SDK('HL2SDK', '1.ep1', '1', 'EPISODEONE', WinLinux, 'episode1'),
|
# 'episode1': SDK('HL2SDK', '1.ep1', '1', 'EPISODEONE', WinLinux, 'episode1'),
|
||||||
# 'ep2': SDK('HL2SDKOB', '2.ep2', '3', 'ORANGEBOX', WinLinux, 'orangebox'),
|
|
||||||
# 'css': SDK('HL2SDKCSS', '2.css', '6', 'CSS', WinLinuxMac, 'css'),
|
|
||||||
# 'hl2dm': SDK('HL2SDKHL2DM', '2.hl2dm', '7', 'HL2DM', WinLinuxMac, 'hl2dm'),
|
|
||||||
# 'dods': SDK('HL2SDKDODS', '2.dods', '8', 'DODS', WinLinuxMac, 'dods'),
|
|
||||||
# 'sdk2013': SDK('HL2SDK2013', '2.sdk2013', '9', 'SDK2013', WinLinuxMac, 'sdk2013'),
|
|
||||||
'tf2': SDK('HL2SDKTF2', '2.tf2', '11', 'TF2', WinLinuxMac, 'tf2')
|
|
||||||
# 'l4d': SDK('HL2SDKL4D', '2.l4d', '12', 'LEFT4DEAD', WinLinuxMac, 'l4d'),
|
|
||||||
# 'nucleardawn': SDK('HL2SDKND', '2.nd', '13', 'NUCLEARDAWN', WinLinuxMac, 'nucleardawn'),
|
|
||||||
# 'l4d2': SDK('HL2SDKL4D2', '2.l4d2', '15', 'LEFT4DEAD2', WinLinuxMac, 'l4d2'),
|
|
||||||
# 'darkm': SDK('HL2SDK-DARKM', '2.darkm', '2', 'DARKMESSIAH', WinOnly, 'darkm'),
|
# 'darkm': SDK('HL2SDK-DARKM', '2.darkm', '2', 'DARKMESSIAH', WinOnly, 'darkm'),
|
||||||
# 'swarm': SDK('HL2SDK-SWARM', '2.swarm', '16', 'ALIENSWARM', WinOnly, 'swarm'),
|
# 'orangebox': SDK('HL2SDKOB', '2.ep2', '3', 'ORANGEBOX', WinLinux, 'orangebox'),
|
||||||
# 'bgt': SDK('HL2SDK-BGT', '2.bgt', '4', 'BLOODYGOODTIME', WinOnly, 'bgt'),
|
# 'bgt': SDK('HL2SDK-BGT', '2.bgt', '4', 'BLOODYGOODTIME', WinOnly, 'bgt'),
|
||||||
# 'eye': SDK('HL2SDK-EYE', '2.eye', '5', 'EYE', WinOnly, 'eye'),
|
# 'eye': SDK('HL2SDK-EYE', '2.eye', '5', 'EYE', WinOnly, 'eye'),
|
||||||
# 'csgo': SDK('HL2SDKCSGO', '2.csgo', '20', 'CSGO', WinLinuxMac, 'csgo'),
|
'css': SDK('HL2SDKCSS', '2.css', '6', 'CSS', WinLinuxMac, 'css'),
|
||||||
# 'dota': SDK('HL2SDKDOTA', '2.dota', '21', 'DOTA', [], 'dota'),
|
'hl2dm': SDK('HL2SDKHL2DM', '2.hl2dm', '7', 'HL2DM', WinLinuxMac, 'hl2dm'),
|
||||||
# 'portal2': SDK('HL2SDKPORTAL2', '2.portal2', '17', 'PORTAL2', [], 'portal2'),
|
'dods': SDK('HL2SDKDODS', '2.dods', '8', 'DODS', WinLinuxMac, 'dods'),
|
||||||
# 'blade': SDK('HL2SDKBLADE', '2.blade', '18', 'BLADE', WinLinux, 'blade'),
|
'sdk2013': SDK('HL2SDK2013', '2.sdk2013', '9', 'SDK2013', WinLinuxMac, 'sdk2013'),
|
||||||
|
# 'bms': SDK('HL2SDKBMS', '2.bms', '11', 'BMS', WinLinux, 'bms'),
|
||||||
|
'tf2': SDK('HL2SDKTF2', '2.tf2', '12', 'TF2', WinLinuxMac, 'tf2'),
|
||||||
|
'l4d': SDK('HL2SDKL4D', '2.l4d', '13', 'LEFT4DEAD', WinLinuxMac, 'l4d'),
|
||||||
|
# 'nucleardawn': SDK('HL2SDKND', '2.nd', '14', 'NUCLEARDAWN', WinLinuxMac, 'nucleardawn'),
|
||||||
|
# 'contagion': SDK('HL2SDKCONTAGION', '2.contagion', '15', 'CONTAGION', WinOnly, 'contagion'),
|
||||||
|
'l4d2': SDK('HL2SDKL4D2', '2.l4d2', '16', 'LEFT4DEAD2', WinLinuxMac, 'l4d2'),
|
||||||
|
# 'swarm': SDK('HL2SDK-SWARM', '2.swarm', '17', 'ALIENSWARM', WinOnly, 'swarm'),
|
||||||
|
# 'portal2': SDK('HL2SDKPORTAL2', '2.portal2', '18', 'PORTAL2', [], 'portal2'),
|
||||||
# 'insurgency': SDK('HL2SDKINSURGENCY', '2.insurgency', '19', 'INSURGENCY', WinLinuxMac, 'insurgency'),
|
# 'insurgency': SDK('HL2SDKINSURGENCY', '2.insurgency', '19', 'INSURGENCY', WinLinuxMac, 'insurgency'),
|
||||||
# 'contagion': SDK('HL2SDKCONTAGION', '2.contagion', '14', 'CONTAGION', WinOnly, 'contagion'),
|
# 'blade': SDK('HL2SDKBLADE', '2.blade', '21', 'BLADE', WinLinux, 'blade'),
|
||||||
# 'bms': SDK('HL2SDKBMS', '2.bms', '10', 'BMS', WinLinux, 'bms'),
|
'csgo': SDK('HL2SDKCSGO', '2.csgo', '23', 'CSGO', WinLinuxMac, 'csgo'),
|
||||||
}
|
}
|
||||||
|
|
||||||
def ResolveEnvPath(env, folder):
|
def ResolveEnvPath(env, folder):
|
||||||
@ -160,7 +159,7 @@ class ExtensionConfig(object):
|
|||||||
self.productVersion = '{0}.{1}.{2}'.format(major, minor, release)
|
self.productVersion = '{0}.{1}.{2}'.format(major, minor, release)
|
||||||
|
|
||||||
def detectSDKs(self):
|
def detectSDKs(self):
|
||||||
sdk_list = builder.options.sdks.split(',')
|
sdk_list = builder.options.sdks.split(' ')
|
||||||
use_all = sdk_list[0] == 'all'
|
use_all = sdk_list[0] == 'all'
|
||||||
use_present = sdk_list[0] == 'present'
|
use_present = sdk_list[0] == 'present'
|
||||||
|
|
||||||
@ -168,7 +167,7 @@ class ExtensionConfig(object):
|
|||||||
sdk = PossibleSDKs[sdk_name]
|
sdk = PossibleSDKs[sdk_name]
|
||||||
if sdk.shouldBuild(self.all_targets):
|
if sdk.shouldBuild(self.all_targets):
|
||||||
if builder.options.hl2sdk_root:
|
if builder.options.hl2sdk_root:
|
||||||
sdk_path = os.path.join(builder.options.hl2sdk_root, sdk.folder)
|
sdk_path = os.path.join(os.path.realpath(builder.options.hl2sdk_root), sdk.folder)
|
||||||
else:
|
else:
|
||||||
sdk_path = ResolveEnvPath(sdk.envvar, sdk.folder)
|
sdk_path = ResolveEnvPath(sdk.envvar, sdk.folder)
|
||||||
if sdk_path is None or not os.path.isdir(sdk_path):
|
if sdk_path is None or not os.path.isdir(sdk_path):
|
||||||
@ -183,7 +182,7 @@ class ExtensionConfig(object):
|
|||||||
raise Exception('At least one SDK must be available.')
|
raise Exception('At least one SDK must be available.')
|
||||||
|
|
||||||
if builder.options.sm_path:
|
if builder.options.sm_path:
|
||||||
self.sm_root = builder.options.sm_path
|
self.sm_root = os.path.realpath(builder.options.sm_path)
|
||||||
else:
|
else:
|
||||||
self.sm_root = ResolveEnvPath('SOURCEMOD', 'sourcemod')
|
self.sm_root = ResolveEnvPath('SOURCEMOD', 'sourcemod')
|
||||||
if not self.sm_root:
|
if not self.sm_root:
|
||||||
@ -360,7 +359,7 @@ class ExtensionConfig(object):
|
|||||||
]
|
]
|
||||||
|
|
||||||
if builder.options.opt == '1':
|
if builder.options.opt == '1':
|
||||||
cxx.cflags += ['/Ox', '/Zo', '-O3']
|
cxx.cflags += ['/Ox', '/Zo']
|
||||||
cxx.linkflags += ['/OPT:ICF', '/OPT:REF']
|
cxx.linkflags += ['/OPT:ICF', '/OPT:REF']
|
||||||
|
|
||||||
if builder.options.debug == '1':
|
if builder.options.debug == '1':
|
||||||
|
|||||||
@ -12,18 +12,9 @@ SourceFolder = os.path.abspath(os.path.normpath(argv[0]))
|
|||||||
OutputFolder = os.path.normpath(argv[1])
|
OutputFolder = os.path.normpath(argv[1])
|
||||||
|
|
||||||
def run_and_return(argv):
|
def run_and_return(argv):
|
||||||
# Python 2.6 doesn't have check_output.
|
|
||||||
if hasattr(subprocess, 'check_output'):
|
|
||||||
text = subprocess.check_output(argv)
|
text = subprocess.check_output(argv)
|
||||||
if str != bytes:
|
if str != bytes:
|
||||||
text = str(text, 'utf-8')
|
text = str(text, 'utf-8')
|
||||||
else:
|
|
||||||
p = subprocess.Popen(argv, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
|
||||||
output, ignored = p.communicate()
|
|
||||||
rval = p.poll()
|
|
||||||
if rval:
|
|
||||||
raise subprocess.CalledProcessError(rval, argv)
|
|
||||||
text = output.decode('utf8')
|
|
||||||
return text.strip()
|
return text.strip()
|
||||||
|
|
||||||
def GetGHVersion():
|
def GetGHVersion():
|
||||||
@ -42,9 +33,6 @@ def GetGitVersion():
|
|||||||
|
|
||||||
rev = None
|
rev = None
|
||||||
cset = None
|
cset = None
|
||||||
if os.path.exists(os.path.join(SourceFolder, '.hg')): # Mercurial repository
|
|
||||||
rev, cset = GetGHVersion()
|
|
||||||
else: # Assume its a git repository
|
|
||||||
rev, cset = GetGitVersion()
|
rev, cset = GetGitVersion()
|
||||||
|
|
||||||
productFile = open(os.path.join(SourceFolder, 'product.version'), 'r')
|
productFile = open(os.path.join(SourceFolder, 'product.version'), 'r')
|
||||||
@ -67,3 +55,7 @@ incFile.write("""
|
|||||||
#endif /* _AUTO_VERSION_INFORMATION_H_ */
|
#endif /* _AUTO_VERSION_INFORMATION_H_ */
|
||||||
""".format(tag, rev, cset, major, minor, release, major, minor, release))
|
""".format(tag, rev, cset, major, minor, release, major, minor, release))
|
||||||
incFile.close()
|
incFile.close()
|
||||||
|
|
||||||
|
filename_versioning = open(os.path.join(OutputFolder, 'filename_versioning.txt'), 'w')
|
||||||
|
filename_versioning.write("{0}.{1}.{2}-git{3}-{4}".format(major, minor, release, rev, cset))
|
||||||
|
filename_versioning.close()
|
||||||
@ -20,7 +20,7 @@ parser.options.add_argument('--enable-auto-versioning', action='store_false', de
|
|||||||
default=True, help='Enables the auto versioning script')
|
default=True, help='Enables the auto versioning script')
|
||||||
parser.options.add_argument('-s', '--sdks', default='all', dest='sdks',
|
parser.options.add_argument('-s', '--sdks', default='all', dest='sdks',
|
||||||
help='Build against specified SDKs; valid args are "all", "present", or '
|
help='Build against specified SDKs; valid args are "all", "present", or '
|
||||||
'comma-delimited list of engine names (default: %default)')
|
'space-delimited list of engine names (default: %default)')
|
||||||
parser.options.add_argument('--targets', type=str, dest='targets', default=None,
|
parser.options.add_argument('--targets', type=str, dest='targets', default=None,
|
||||||
help="Override the target architecture (use commas to separate multiple targets).")
|
help="Override the target architecture (use commas to separate multiple targets).")
|
||||||
parser.Configure()
|
parser.Configure()
|
||||||
@ -44,6 +44,7 @@ typedef enum EAuthProtocol
|
|||||||
k_EAuthProtocolSteam = 3,
|
k_EAuthProtocolSteam = 3,
|
||||||
} EAuthProtocol;
|
} EAuthProtocol;
|
||||||
|
|
||||||
|
#if SOURCE_ENGINE < SE_SDK2013 || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_LEFT4DEAD || SOURCE_ENGINE == SE_LEFT4DEAD2
|
||||||
typedef enum EBeginAuthSessionResult
|
typedef enum EBeginAuthSessionResult
|
||||||
{
|
{
|
||||||
k_EBeginAuthSessionResultOK = 0, // Ticket is valid for this game and this steamID.
|
k_EBeginAuthSessionResultOK = 0, // Ticket is valid for this game and this steamID.
|
||||||
@ -53,6 +54,7 @@ typedef enum EBeginAuthSessionResult
|
|||||||
k_EBeginAuthSessionResultGameMismatch = 4, // Ticket is not for this game
|
k_EBeginAuthSessionResultGameMismatch = 4, // Ticket is not for this game
|
||||||
k_EBeginAuthSessionResultExpiredTicket = 5, // Ticket has expired
|
k_EBeginAuthSessionResultExpiredTicket = 5, // Ticket has expired
|
||||||
} EBeginAuthSessionResult;
|
} EBeginAuthSessionResult;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct netadr_s
|
typedef struct netadr_s
|
||||||
{
|
{
|
||||||
@ -74,7 +76,11 @@ public:
|
|||||||
const char *CSteamID::Render() const
|
const char *CSteamID::Render() const
|
||||||
{
|
{
|
||||||
static char szSteamID[64];
|
static char szSteamID[64];
|
||||||
|
#if SOURCE_ENGINE < SE_SDK2013 || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_LEFT4DEAD || SOURCE_ENGINE == SE_LEFT4DEAD2
|
||||||
V_snprintf(szSteamID, sizeof(szSteamID), "STEAM_0:%u:%u", (m_unAccountID % 2) ? 1 : 0, (int32)m_unAccountID/2);
|
V_snprintf(szSteamID, sizeof(szSteamID), "STEAM_0:%u:%u", (m_unAccountID % 2) ? 1 : 0, (int32)m_unAccountID/2);
|
||||||
|
#else
|
||||||
|
V_snprintf(szSteamID, sizeof(szSteamID), "STEAM_0:%u:%u", (m_steamid.m_comp.m_unAccountID % 2) ? 1 : 0, (int32)m_steamid.m_comp.m_unAccountID/2);
|
||||||
|
#endif
|
||||||
return szSteamID;
|
return szSteamID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user