mirror of
https://github.com/yquake2/ctf.git
synced 2025-04-20 17:43:18 +00:00
Compare commits
24 commits
Author | SHA1 | Date | |
---|---|---|---|
|
3a1863f625 | ||
|
c7a4b27bf6 | ||
|
8878216828 | ||
|
dcc5a1f616 | ||
|
869b18c329 | ||
|
0a7e3c9c78 | ||
|
693e82ffa4 | ||
|
b9cac9410e | ||
|
787de54da5 | ||
|
6a2d5125f6 | ||
|
b8a45290a2 | ||
|
38cc7813dd | ||
|
a5f933ba03 | ||
|
95852c466c | ||
|
4bbda4cd98 | ||
|
48c30c68a3 | ||
|
c99c53d4b6 | ||
|
554590fca9 | ||
|
ab58bc5a37 | ||
|
606a52ddf4 | ||
|
7932c76d16 | ||
|
55b80715ac | ||
|
2e2e1945e8 | ||
|
5e4fc5a0ed |
14 changed files with 377 additions and 38 deletions
45
.github/workflows/linux_aarch64.yml
vendored
Normal file
45
.github/workflows/linux_aarch64.yml
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
name: Testbuild for Linux (aarch64)
|
||||
run-name: testbuild_linux_aarch64
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
types:
|
||||
- edited
|
||||
- opened
|
||||
- synchronize
|
||||
concurrency:
|
||||
# Cancel concurrent workflows for the same PR or commit hash.
|
||||
group: ${{github.workflow}}-${{github.event_name == 'pull_request' && github.head_ref || github.sha}}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
build_ubuntu_aarch64:
|
||||
runs-on: ubuntu-22.04-arm
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- env: ubuntu
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- name: Build
|
||||
run: |
|
||||
# Public runners come with 4 CPUs.
|
||||
make -j4
|
||||
- name: Create testbuild package
|
||||
run: |
|
||||
# Create release directory tree
|
||||
mkdir -p publish/quake2-ctf-linux_aarch64-${{github.sha}}/misc/docs
|
||||
# Copy release assets
|
||||
cp -r release/* publish/quake2-ctf-linux_aarch64-${{github.sha}}/
|
||||
# Copy misc assets
|
||||
cp LICENSE publish/quake2-ctf-linux_aarch64-${{github.sha}}/misc/docs/LICENSE.txt
|
||||
cp README.md publish/quake2-ctf-linux_aarch64-${{github.sha}}/misc/docs/README.txt
|
||||
- name: Upload testbuild package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: quake2-ctf-linux_aarch64-${{github.sha}}
|
||||
path: publish/
|
||||
if-no-files-found: error
|
45
.github/workflows/linux_x86_64.yml
vendored
Normal file
45
.github/workflows/linux_x86_64.yml
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
name: Testbuild for Linux (x86_64)
|
||||
run-name: testbuild_linux_x86_64
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
types:
|
||||
- edited
|
||||
- opened
|
||||
- synchronize
|
||||
concurrency:
|
||||
# Cancel concurrent workflows for the same PR or commit hash.
|
||||
group: ${{github.workflow}}-${{github.event_name == 'pull_request' && github.head_ref || github.sha}}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
build_ubuntu_x86_64:
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- env: ubuntu
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- name: Build
|
||||
run: |
|
||||
# Public runners come with 4 CPUs.
|
||||
make -j4
|
||||
- name: Create testbuild package
|
||||
run: |
|
||||
# Create release directory tree
|
||||
mkdir -p publish/quake2-ctf-linux_x86_64-${{github.sha}}/misc/docs
|
||||
# Copy release assets
|
||||
cp -r release/* publish/quake2-ctf-linux_x86_64-${{github.sha}}/
|
||||
# Copy misc assets
|
||||
cp LICENSE publish/quake2-ctf-linux_x86_64-${{github.sha}}/misc/docs/LICENSE.txt
|
||||
cp README.md publish/quake2-ctf-linux_x86_64-${{github.sha}}/misc/docs/README.txt
|
||||
- name: Upload testbuild package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: quake2-ctf-linux_x86_64-${{github.sha}}
|
||||
path: publish/
|
||||
if-no-files-found: error
|
49
.github/workflows/macos.yml
vendored
Normal file
49
.github/workflows/macos.yml
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
name: Testbuild for MacOS
|
||||
run-name: testbuild_macos
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
types:
|
||||
- edited
|
||||
- opened
|
||||
- synchronize
|
||||
concurrency:
|
||||
# Cancel concurrent workflows for the same PR or commit hash.
|
||||
group: ${{github.workflow}}-${{github.event_name == 'pull_request' && github.head_ref || github.sha}}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
build_macos_aarch64:
|
||||
runs-on: macos-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- env: macos
|
||||
steps:
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
brew update
|
||||
brew install make
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- name: Build
|
||||
run: |
|
||||
# Public runners come with 3 CPUs.
|
||||
gmake -j3
|
||||
- name: Create testbuild package
|
||||
run: |
|
||||
# Create release directory tree
|
||||
mkdir -p publish/quake2-ctf-macos-${{github.sha}}/misc/docs
|
||||
# Copy release assets
|
||||
cp -r release/* publish/quake2-ctf-macos-${{github.sha}}/
|
||||
# Copy misc assets
|
||||
cp LICENSE publish/quake2-ctf-macos-${{github.sha}}/misc/docs/LICENSE.txt
|
||||
cp README.md publish/quake2-ctf-macos-${{github.sha}}/misc/docs/README.txt
|
||||
- name: Upload testbuild package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: quake2-ctf-macos-${{github.sha}}
|
||||
path: publish/
|
||||
if-no-files-found: error
|
56
.github/workflows/win32.yml
vendored
Normal file
56
.github/workflows/win32.yml
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
name: Testbuild for Win32
|
||||
run-name: testbuild_win32
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
types:
|
||||
- edited
|
||||
- opened
|
||||
- synchronize
|
||||
concurrency:
|
||||
# Cancel concurrent workflows for the same PR or commit hash.
|
||||
group: ${{github.workflow}}-${{github.event_name == 'pull_request' && github.head_ref || github.sha}}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
build_mingw_x86_32:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- { sys: mingw32, env: i686 }
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{matrix.sys}}
|
||||
update: true
|
||||
install: >-
|
||||
git
|
||||
make
|
||||
mingw-w64-${{matrix.env}}-gcc
|
||||
mingw-w64-${{matrix.env}}-make
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- name: Build
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
# Public runners come with 4 CPUs.
|
||||
make -j4
|
||||
- name: Create testbuild package
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
# Create release directory tree
|
||||
mkdir -p publish/quake2-ctf-win32-${{github.sha}}/misc/docs
|
||||
# Copy release assets
|
||||
cp -r release/* publish/quake2-ctf-win32-${{github.sha}}/
|
||||
# Copy misc assets
|
||||
cp LICENSE publish/quake2-ctf-win32-${{github.sha}}/misc/docs/LICENSE.txt
|
||||
cp README.md publish/quake2-ctf-win32-${{github.sha}}/misc/docs/README.txt
|
||||
- name: Upload testbuild package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: quake2-ctf-win32-${{github.sha}}
|
||||
path: publish/
|
||||
if-no-files-found: error
|
56
.github/workflows/win64.yml
vendored
Normal file
56
.github/workflows/win64.yml
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
name: Testbuild for Win64
|
||||
run-name: testbuild_win64
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
types:
|
||||
- edited
|
||||
- opened
|
||||
- synchronize
|
||||
concurrency:
|
||||
# Cancel concurrent workflows for the same PR or commit hash.
|
||||
group: ${{github.workflow}}-${{github.event_name == 'pull_request' && github.head_ref || github.sha}}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
build_mingw_x86_64:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- { sys: mingw64, env: x86_64 }
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{matrix.sys}}
|
||||
update: true
|
||||
install: >-
|
||||
git
|
||||
make
|
||||
mingw-w64-${{matrix.env}}-gcc
|
||||
mingw-w64-${{matrix.env}}-make
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- name: Build
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
# Public runners come with 4 CPUs.
|
||||
make -j4
|
||||
- name: Create testbuild package
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
# Create release directory tree
|
||||
mkdir -p publish/quake2-ctf-win64-${{github.sha}}/misc/docs
|
||||
# Copy release assets
|
||||
cp -r release/* publish/quake2-ctf-win64-${{github.sha}}/
|
||||
# Copy misc assets
|
||||
cp LICENSE publish/quake2-ctf-win64-${{github.sha}}/misc/docs/LICENSE.txt
|
||||
cp README.md publish/quake2-ctf-win64-${{github.sha}}/misc/docs/README.txt
|
||||
- name: Upload testbuild package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: quake2-ctf-win64-${{github.sha}}
|
||||
path: publish/
|
||||
if-no-files-found: error
|
|
@ -1,3 +1,12 @@
|
|||
Three Wave Capture The Flag 1.10 to 1.11
|
||||
- Fix build in C23 mode.
|
||||
|
||||
Three Wave Capture The Flag 1.09 to 1.10
|
||||
- Fix build on ARM Macs.
|
||||
|
||||
Three Wave Capture The Flag 1.08 to 1.09
|
||||
- Several small bugfixes.
|
||||
|
||||
Three Wave Capture The Flag 1.07 to 1.08
|
||||
- Several small bugfixes.
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
# Print a message that using the Makefiles is recommended.
|
||||
message(NOTICE: " The CMakeLists.txt is unmaintained. Use the Makefile if possible.")
|
||||
|
||||
# Enforce "Debug" as standard build type
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
|
||||
|
|
8
Makefile
8
Makefile
|
@ -47,8 +47,12 @@ YQ2_ARCH ?= $(PROCESSOR_ARCHITECTURE)
|
|||
endif
|
||||
endif # windows but MINGW_CHOST not defined
|
||||
else
|
||||
ifneq ($(YQ2_OSTYPE), Darwin)
|
||||
# Normalize some abiguous YQ2_ARCH strings
|
||||
YQ2_ARCH ?= $(shell uname -m | sed -e 's/i.86/i386/' -e 's/amd64/x86_64/' -e 's/^arm.*/arm/')
|
||||
YQ2_ARCH ?= $(shell uname -m | sed -e 's/i.86/i386/' -e 's/amd64/x86_64/' -e 's/arm64/aarch64/' -e 's/^arm.*/arm/')
|
||||
else
|
||||
YQ2_ARCH ?= $(shell uname -m)
|
||||
endif
|
||||
endif
|
||||
|
||||
# On Windows / MinGW $(CC) is undefined by default.
|
||||
|
@ -84,7 +88,7 @@ endif
|
|||
# to get it there...
|
||||
# -fwrapv for defined integer wrapping. MSVC6 did this
|
||||
# and the game code requires it.
|
||||
override CFLAGS += -std=gnu99 -fno-strict-aliasing -fwrapv
|
||||
override CFLAGS += -fno-strict-aliasing -fwrapv
|
||||
|
||||
# -MMD to generate header dependencies. Unsupported by
|
||||
# the Clang shipped with OS X.
|
||||
|
|
32
README
32
README
|
@ -1,32 +0,0 @@
|
|||
This is a 64 bit clean and bugfixed version of id Software's Quake II
|
||||
addon pack "Capture The Flag", developed by David 'Zoid' Kirsch. Hundred
|
||||
of type errors and strange constructs were fixed, thus this version
|
||||
should run much more stable than the old SDK version. While it may work
|
||||
with every Quake II client, the "Yamagi Quake II" client is highly
|
||||
recommended. For more Information visit http://www.yamagi.org/quake2.
|
||||
|
||||
Installation for FreeBSD, Linux and OpenBSD:
|
||||
--------------------------------------------
|
||||
1. Type "make" or "gmake" to compile the game.so.
|
||||
2. Copy release/game.so to the ctf/ subfolder of your Quake II
|
||||
installation. The CTF gamedata is part of the 3.20 point release.
|
||||
3. Start the game with "./quake2 +set game ctf".
|
||||
|
||||
Installation for OS X:
|
||||
----------------------
|
||||
1. Copy game.dll from the zip-archive to ctf/.
|
||||
2. Start the game with "quake2 +set game ctf"
|
||||
|
||||
If you want to compile 'ctf' for OS X from source, please take a look at
|
||||
the "Installation" section of the README of the Yamagi Quake II client.
|
||||
In the same file the integration into an app-bundle is explained.
|
||||
|
||||
Installation for Windows:
|
||||
-------------------------
|
||||
1. Copy the game.dll to the ctf\ subfolder of your Quake II
|
||||
installation. The CTF gamedata is part of the 3.20 point release.
|
||||
2. Start the game with "quake2.exe +set game ctf".
|
||||
|
||||
If you want to compile 'ctf' for Windows from source, please take a
|
||||
look at the "Installation" section of the README of the Yamagi Quake
|
||||
II client. There's descripted how to setup the build environment.
|
66
README.md
Normal file
66
README.md
Normal file
|
@ -0,0 +1,66 @@
|
|||
# Three Wave Capture The Flag for Yamagi Quake II
|
||||
|
||||
Three Wave Capture The Flag for Yamagi Quake II is a bugfixed version of
|
||||
the official CTF addon for Quake II. It's based upon the Quake II source
|
||||
code release and and is licensed under GPL version 2:
|
||||
|
||||
* [LICENSE](https://github.com/yquake2/ctf/blob/master/LICENSE)
|
||||
|
||||
Several bugs were fixed. The addon is intended to be used with Yamagi
|
||||
Quake II, but it's also fully backward compatible with the last Quake II
|
||||
pointrelease 3.20 and may work with other source ports.
|
||||
|
||||
Officially supported operating systems are:
|
||||
|
||||
* FreeBSD
|
||||
* Linux
|
||||
* Windows
|
||||
|
||||
Beside theses Three Wave Capture The Flag for Yamagi Quake II has
|
||||
community support for MacOS and most other unixoid operating systems,
|
||||
including NetBSD, OpenBSD and Solaris.
|
||||
|
||||
|
||||
## Development
|
||||
|
||||
Three Wave Capture The Flag for Yamagi Quake II is a community driven
|
||||
project and lives from community involvement. Please report bugs in our
|
||||
issue tracker:
|
||||
|
||||
* [Issue Tracker](https://github.com/yquake2/ctf/issues)
|
||||
|
||||
We are always open to code contributions, no matter if they are small
|
||||
bugfixes or bigger features. However, Yamagi Quake II is a conservative
|
||||
project with big focus on stability and backward compatibility. We don't
|
||||
accept breaking changes. When in doubt please open an issue and ask if a
|
||||
contribution in welcome before putting too much work into it. Open a
|
||||
pull request to submit code:
|
||||
|
||||
* [Pull Requests](https://github.com/yquake2/ctf/pulls)
|
||||
|
||||
Also have a look at our contributors guide:
|
||||
|
||||
* [Contributors Guide](https://github.com/yquake2/yquake2/blob/master/doc/080_contributing.md)
|
||||
|
||||
|
||||
## Documentation
|
||||
|
||||
Yamagi Quake II has rather extensive documentation covering all relevant
|
||||
areas from installation and configuration to package building. Have a
|
||||
look at the documentation index:
|
||||
|
||||
* [Documentation Index](https://github.com/yquake2/yquake2/blob/master/doc/010_index.md)
|
||||
|
||||
|
||||
## Releases
|
||||
|
||||
Three Wave Capture The Flag for Yamagi Quake II releases at an irregular
|
||||
schedule. The official releases with source code tarballs and prebuild
|
||||
Windows binaries can be found at the homepage:
|
||||
|
||||
* [Homepage](https://www.yamagi.org/quake2/)
|
||||
|
||||
Our CI builds **unsupported** Linux, MacOS and Windows binaries at every
|
||||
commit. The artifacts can be found here:
|
||||
|
||||
* [Github Actions](https://github.com/yquake2/ctf/actions)
|
|
@ -334,7 +334,7 @@ BecomeExplosion1(edict_t *self)
|
|||
{
|
||||
CTFResetFlag(CTF_TEAM2); /* this will free self! */
|
||||
gi.bprintf(PRINT_HIGH, "The %s flag has returned!\n",
|
||||
CTFTeamName(CTF_TEAM1));
|
||||
CTFTeamName(CTF_TEAM2));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -168,11 +168,11 @@ SV_FilterPacket(char *from)
|
|||
{
|
||||
if ((in & ipfilters[i].mask) == ipfilters[i].compare)
|
||||
{
|
||||
return (int)filterban->value;
|
||||
return (filterban->value != 0);
|
||||
}
|
||||
}
|
||||
|
||||
return (int)!filterban->value;
|
||||
return (filterban->value == 0);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -36,8 +36,21 @@
|
|||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
typedef unsigned char byte;
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L // C23 or newer
|
||||
typedef bool qboolean;
|
||||
#else
|
||||
#ifdef true
|
||||
#undef true
|
||||
#endif
|
||||
|
||||
#ifdef false
|
||||
#undef false
|
||||
#endif
|
||||
|
||||
typedef enum {false, true} qboolean;
|
||||
#endif
|
||||
|
||||
typedef unsigned char byte;
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((void *)0)
|
||||
|
|
|
@ -1515,10 +1515,35 @@ weapon_supershotgun_fire(edict_t *ent)
|
|||
v[YAW] = ent->client->v_angle[YAW] - 5;
|
||||
v[ROLL] = ent->client->v_angle[ROLL];
|
||||
AngleVectors(v, forward, NULL, NULL);
|
||||
|
||||
if (aimfix->value)
|
||||
{
|
||||
AngleVectors(v, forward, right, NULL);
|
||||
|
||||
VectorScale(forward, -2, ent->client->kick_origin);
|
||||
ent->client->kick_angles[0] = -2;
|
||||
|
||||
VectorSet(offset, 0, 8, ent->viewheight - 8);
|
||||
P_ProjectSource(ent, offset, forward, right, start);
|
||||
}
|
||||
|
||||
fire_shotgun(ent, start, forward, damage, kick, DEFAULT_SHOTGUN_HSPREAD,
|
||||
DEFAULT_SHOTGUN_VSPREAD, DEFAULT_SSHOTGUN_COUNT / 2, MOD_SSHOTGUN);
|
||||
|
||||
v[YAW] = ent->client->v_angle[YAW] + 5;
|
||||
AngleVectors(v, forward, NULL, NULL);
|
||||
|
||||
if (aimfix->value)
|
||||
{
|
||||
AngleVectors(v, forward, right, NULL);
|
||||
|
||||
VectorScale(forward, -2, ent->client->kick_origin);
|
||||
ent->client->kick_angles[0] = -2;
|
||||
|
||||
VectorSet(offset, 0, 8, ent->viewheight - 8);
|
||||
P_ProjectSource(ent, offset, forward, right, start);
|
||||
}
|
||||
|
||||
fire_shotgun(ent, start, forward, damage, kick,
|
||||
DEFAULT_SHOTGUN_HSPREAD, DEFAULT_SHOTGUN_VSPREAD,
|
||||
DEFAULT_SSHOTGUN_COUNT / 2, MOD_SSHOTGUN);
|
||||
|
|
Loading…
Reference in a new issue