Commit graph

93 commits

Author SHA1 Message Date
micwoj92
23d0f705c6
fix some typos in comments 2020-05-21 03:07:15 +02:00
Yamagi
26019096ee Resolve oversight in last commit. 2020-04-21 13:52:24 +02:00
Yamagi
1531bcebb7 Bring Makefile on par with yquake2:
* Make CFLAGS and LDFLAGS overrideable
* Correct architecture and operating system detection.
* Enforce FPU mode.
* Implement DEBUG.
* Pass LDFLAGS after the objects.

Closes #9, closes #10.
2020-04-21 13:33:00 +02:00
Yamagi
fad0152c6b
Merge pull request #11 from mjr4077au/Client_AimFixWithCVAR
Implement accurate-aiming CVAR in ctf game code.
2020-04-21 12:51:37 +02:00
Mitchell Richters
8e92749a8b Implement accurate-aiming CVAR in ctf game code. 2020-04-21 07:44:11 +10:00
Yamagi
16198d78be Update the CHANGELOG for 1.07. 2020-02-24 17:01:11 +01:00
Yamagi
befa16b12f Add a simple .gitignore. 2020-02-24 17:00:09 +01:00
Yamagi
71574de589 Limit the fix against black debris to gibs, debris, monsters.
Pushing all entities slightly away from non-horizontal may let items to
slide to unreachable locations, or let monsters getting stuck.

This is part of yquake2/xatrix#50
2020-02-22 15:27:22 +01:00
Yamagi
2ffb440a66
Merge pull request #8 from i-amdroid/macos-build-fix
Fixed macos building.
2020-01-01 13:27:31 +01:00
Andrey Yurtaev
d209850ef7 Fixed macos building. 2019-12-21 04:30:16 +03:00
Yamagi Burmeister
cf0471a367 Push entitie slightly away from non horizontal surfaces.
Otherwise the entities origin might be in the surface, which causes it
to be rendered in full black.
2019-06-15 17:43:42 +02:00
Yamagi Burmeister
8c58273867 Put -lm into the global LDFLAGS and not into the linker command.
This is more inline with what we're doing in the other addons. And -lm
is a library that's linked unconditionally.
2019-05-13 17:11:45 +02:00
Yamagi
4f8b49daf3
Merge pull request #4 from smcv/libm
Link ctf game.so to math library
2019-05-13 17:04:59 +02:00
Yamagi Burmeister
821872c798 Build a .dylib for OS X. 2019-05-09 18:28:10 +02:00
Yamagi
15a25d8daa
Merge pull request #3 from smcv/source-date-epoch
Use SOURCE_DATE_EPOCH for reproducible build
2019-05-09 18:19:09 +02:00
Yamagi
0e35097cd0
Merge pull request #2 from smcv/spelling
Fix some spelling mistakes detected by Debian's Lintian tool
2019-05-09 18:18:36 +02:00
Yamagi Burmeister
d7457925db Don't allow 'give health 0' or even less.
Giving the player < -1 health and increasing it to something
above 0 without closing the console breaks the player state.
2019-04-27 19:20:18 +02:00
Yamagi Burmeister
c13036df55 Update the CHANGELOG for 1.06. 2019-02-04 14:36:05 +01:00
Yamagi Burmeister
08a9c4fdc1 Import Q_strlcpy() and replace several dangerous strncpy() with it. 2018-10-25 19:37:41 +02:00
Yamagi Burmeister
1e37bf132d Switch some annoying and wrang GCC warnings off. 2018-10-25 19:34:12 +02:00
Yamagi Burmeister
2d6dd4117d Call strcasecmp() and not Quake IIs home made version.
The home made version is crap and not const correct.
2018-10-25 19:31:06 +02:00
Yamagi Burmeister
b67a392cb6 Split the gibs per frame limit between gibs and debris.
The gibs and debris per frame must be limited to prevent server mem
map overflows. Until now debris and gibs were handled the same, the
debris spawned by rockets and grenates could prevent the actual gibs
of the killed monster from spawning.

Before this change 20 entities were spawned at max. Now up tp 40
enties can be spawned. This needs some testings.
2018-10-07 12:02:20 +02:00
Simon McVittie
f5449a9185 Link ctf game.so to math library
It uses sqrt() and similar functions.

Signed-off-by: Simon McVittie <smcv@debian.org>
2018-07-21 11:41:34 +01:00
Simon McVittie
3e82fe1ef2 Use SOURCE_DATE_EPOCH for reproducible build
Similar to https://github.com/yquake2/yquake2/pull/142 in the yquake2
engine/base game.

Signed-off-by: Simon McVittie <smcv@debian.org>
2018-07-21 11:39:13 +01:00
Simon McVittie
097dd56e35 Fix some spelling mistakes detected by Debian's Lintian tool
Signed-off-by: Simon McVittie <smcv@debian.org>
2018-07-21 11:33:41 +01:00
Yamagi Burmeister
ca0e44b2a4 Replace strcasecmp() by Q_strcasecmp() for better MSVC compaibility.
This was suggest by @ajbonner in xatrix issue #11.
2018-03-23 15:55:43 +01:00
Yamagi Burmeister
5447354a76 Fix a potential crash in ai_run_melee() and ai_run_missile().
This was found and fixed by Maraakate.
2017-09-07 18:12:41 +02:00
Yamagi Burmeister
6f1b2f101f Enforce static linkage of libgcc on Windows. 2017-06-16 13:48:58 +02:00
Yamagi Burmeister
327cea19f5 Update the CHANGELOG for 1.04. 2017-05-25 11:47:56 +02:00
Yamagi Burmeister
df29a29633 Reorder conditionals to please unoptimizing compilers
This was requested by Maraakate. This is likely a noop, since even
early compilers from th 1970th supported simple optimiziations like
this.
2016-12-20 15:22:57 +01:00
Yamagi Burmeister
b475a527c9 Change edict_s->show_hostile from qboolean to int and add casts
This variable is used as an integer. Defining it as a qbooblean is
just wrong. Add some explicit float -> int casts while at it.
2016-12-18 09:27:56 +01:00
Yamagi Burmeister
eadb063611 Rename teleport_time to last_sound time
teleport_time has nothing to do with teleports, it's just the time
since the last player sound. Rename it accordingly. This was suggest
by maraakate in yquake2 issue #162.
2016-12-18 09:26:51 +01:00
Yamagi Burmeister
d8d33d4353 Fix monsters ignoring the player under certain circumstances
In ai_checkattack() is a check against AI_SOUND_TARGET. If the player
made a noice and the the monster noticed this noise it's true. If
that noice was more than 5 seconds ago the monster forgets that event
and continues with it's search for the player. Otherwise it informs
the surrounding monsters that something interesting has happened and
then returns false. So the problem is: Even if the monster heard the
player and can see him, it aborts at this point.

Fix this by adding an additional visibility check. Do the sound
checking only if the player is not visible, otherwise just continue.

This was reported by shoober420 and debbuged by maraakate. This fix
was DanielGibons idea. This commit fixes yquake2 issue #162.
2016-12-18 09:25:42 +01:00
Yamagi Burmeister
b71b80d790 Generate game.dylib on OS X. Fixes #148. 2016-08-14 16:31:46 +02:00
Yamagi Burmeister
8439d43508 Update the CHANGELOG 2016-06-25 10:32:41 +02:00
Yamagi Burmeister
adb307b197 Switch from an arch whitelist to an "all archs are supported" approach. 2016-06-11 09:53:38 +02:00
Yamagi Burmeister
8cef59c4c8 Make gibs and debris SOLID_BBOX so they move on entities. 2016-04-29 17:47:19 +02:00
Martin Hauke
a089f4c747 Fix CMake support 2016-03-17 09:02:00 +01:00
Yamagi Burmeister
8a40cd5e9f Reset gibsthisframe and lastgibframe at map change
Without this change the conditionals at g_misc.c:199 and 381 wouldn't
trigger until level.framenum reach it's previous value, resulting in
much to few debris or gibs being thrown. This fixes #104.

Many thanks to maraakate for the analysis and the idea how to fix it.
2015-10-24 13:14:31 +02:00
Yamagi Burmeister
0516300a11 Update CHANGELOG 2015-09-07 17:15:12 +02:00
Yamagi Burmeister
36ed53346e fix a divinely dumbassed mistake of global 'i' and 'corners' variables
Submitted by: Ozkan Sezer
2015-08-31 18:54:02 +02:00
Yamagi Burmeister
70c9889d16 Info_RemoveKey: use memmove instead of strcpy for overlapping memory areas.
Submitted by: Ozkan Sezer
2015-08-31 18:53:18 +02:00
Yamagi Burmeister
445f266843 SV_Physics_Pusher: fix the 'memory corrupted' check
Submitted by: Ozkan Sezer
2015-08-31 18:48:27 +02:00
Yamagi Burmeister
ee24659ba4 fix several printf format string errors in games' code
Submitted by: Ozkan Sezer
2015-08-31 18:46:49 +02:00
Yamagi Burmeister
a65b93192c Removed unused prototype to GetGameApi()
Submitted by: Ozkan Sezer
2015-08-31 18:44:19 +02:00
Yamagi Burmeister
dffca8fc79 Add CMake support 2015-08-23 19:17:53 +02:00
Daniel Gibson
988afce481 Fix bug with high velocities in vents in 32bit builds, fix MingW build
See https://github.com/yquake2/yquake2/issues/71
and https://github.com/yquake2/xatrix/issues/4

In ClientThink(), the float value ent->velocity[i]*8 is saved into
a short and if the value is too big for a short, in 32bit gcc builds
the short is set to SHRT_MIN, resulting in the player being pressed
down instead of up.
Now we put the result in a 32bit int first (which should be big enough)
and assign the int to the short. This still overflows, but with -fwrapv
at least in a defined way (most probably the same way the original
binaries did).

The Makefile now sets $CC to gcc for MingW builds, this should fix
https://github.com/yquake2/xatrix/issues/3

And while I was at it, when the game lib is loaded, it prints the date
it was built, this is especially interesting for our Win32 binaries.
2015-05-17 18:45:26 +02:00
Daniel Gibson
e2b397d92c One entity shooting another should work even if friendly fire is off
In rogue's RHANGAR1 the turret didn't blow up the ceiling when friendly fire
was off, because in ClientTeam() both entities were set to "" (no team),
but OnSameTeam() just did a strcmp() instead of checking this special
case (no team).
We check this now and thus it works. Hooray.
I also refactored ClientTeam() to take the buffer instead of using a
static one and to be static (it's only called by OnSameTeam() anyway).
2014-11-30 18:02:32 +01:00
Yamagi Burmeister
ca84136e65 Use the correct flavors of abs() 2014-08-03 11:16:08 +02:00
Yamagi Burmeister
017bc7276f Rewrite COM_FileExtention()
COM_FileExtension() was parsing strings from beginning to end, bailing
out as soon as '.' was found and treating everything thereafter as the
file extension. That behavior caused problem with relatives pathes like
models/monsters/tank/../ctank/skin.pcx. The new implementation uses
strrchr() to determine the last '.'.
2014-07-30 21:39:58 +02:00