Commit Graph
4195 Commits
Author SHA1 Message Date
drian d6ac9861d6 Merge remote-tracking branch 'upstream/master' 2021-03-06 15:20:05 +01:00
justgo97andaurhat c54e9564bb fix compiling warnings in GCC 2021-03-03 22:23:52 +01:00
drian ddb06d8e7a alt + tab & win + d does not work properly, mouse unlocks both in full screen and window mode 2021-02-15 06:43:48 +01:00
drian dc1b506413 Fixed: When you get pistol ammunition while you have akimbo you get ammunition clips for a pistol too 2021-02-15 06:25:50 +01:00
drian 6cce372436 In the menus SDLK_KP_ENTER key should behave the same as SDLK_RETURN 2021-02-15 05:57:10 +01:00
aurhatanddrian b8b0eb96bd Hide spectator reflection and fix moving in 3rd person perspective
Earlier in third person perspective:
1. reflection of the spectator (player1) was visible on the water (at least
after full cycle of spectate mode switching);
2. it was possible to move position of the invisible spectator's (player1)
ghost, although he should be attached to spectated player. Bug was visible
on the water (the reflection moved) and in some cases on minimap - when
player executed "spectate" and later "spectatemode 1", then camera stayed
in the same position, but player position changed.

Thanks BrutalSystem
2021-02-15 05:29:36 +01:00
aurhatanddrian 973e1fa87c Fix blinking in menu
Thanks BrutalSystem
2021-02-15 05:25:41 +01:00
aurhatanddrian f1eb081383 Fix water blinking
Blinking was good visible and annoying in edit mode, for example for
alpha=255. Backport from Sauerbraten.
Thanks BrutalSystem
2021-02-15 05:22:22 +01:00
drian 1e61cbf669 Merge branch 'master' into release_v1.3 2021-02-14 20:05:18 +01:00
aurhatanddrian e26af31d46 Hide damage indicator when different spectated player is followed
Also reset damage indicators on spawn.
2021-02-14 20:04:32 +01:00
aurhatanddrian 01c5c98328 Fix flag icon displaying on the radar 2021-02-14 20:03:14 +01:00
drian 143890eab9 mergefix 2021-02-14 20:02:03 +01:00
aurhatanddrian db18caba16 Fix grenade icon alignment for enabled oldfashionedgunstats
Now, if oldfashionedgunstats is enabled, then ammo stats > 99 won't collide
with grenade icon on modern monitors with aspect ratio > 1.5 . It will
collide still on older monitors, because of lack of the free space on HUD.
2021-02-14 19:46:14 +01:00
drian 4a064da5b5 mergefix 2021-02-10 21:10:15 +01:00
drian b615fe449e Merge remote-tracking branch 'remotes/origin/next' into release_v1.3 2021-02-10 21:00:09 +01:00
drian bc6941d30c Merge remote-tracking branch 'remotes/origin/libcurl4_1202_hotfix' into release_v1.3 2021-02-10 20:40:40 +01:00
drian ceac59f0b2 #223 Nade thrown above other players head should not bounce back 2021-02-09 11:27:44 +01:00
drian 0503344c6b #221 Client must guarantee that data sent over the network complies to the network protocol 2021-02-09 06:59:12 +01:00
aurhat 8bb1aba638 Fix warnings for gcc 9.3 2020-11-03 22:15:34 +01:00
aurhat 2ecb3646e1 Fix warning for clang 10 2020-11-03 12:52:37 +01:00
justgo97andaurhat fd89c56f17 fix compiling warnings in GCC 2020-11-03 12:52:37 +01:00
ac-stefandaurhat 6ec9d3cf80 fix seedlen 2020-11-03 12:52:37 +01:00
Frank LENORMANDandaurhat 1009a4f050 some fixes 2020-11-02 22:42:24 +01:00
Šarūnas Snapkauskasandaurhat 4f8f2737a4 server: fix blocking of non-existent primary guns
I think driAn meant to use OR, as using AND leads to FALSE.
2020-11-02 22:42:00 +01:00
aurhat 9b41c110c6 Fix clang warnings and crashes 2020-11-02 22:42:00 +01:00
aurhat c2e09cac76 Abide by the rules for reference objects
It fixes crashes on certain maps (also official).
It bases on 3ec0b1218d
2020-11-02 22:42:00 +01:00
aurhat ae65a64828 Fix some errors and warnings for GCC 6
* do not use std::abs() because math.h includes one, that converts ints
      to double. Use own iabs(), which directly uses labs() instead.
    * don't use the word "gamma" as name for variables
    * don't use a homebrew round() function

It bases mainly on 98d01d1f34
2020-11-02 22:42:00 +01:00
ac-stefandaurhat f8d3e968ed fix clang warnings 2020-02-08 14:33:18 +01:00
ac-stefandaurhat 7b5c91a3da temporary win10 hotfix changes
Some changes to allow the current experimental branch to be used for a
hotfix release for win10 users.

The latest win10-update broke compatibility with SDL1.2 - and apparently
MS is not going to fix it. This hotfix allows win10 users to use our
experimental SDL2-based client.

It is quite incompatible with the 1.2.0.2 release - but it's good enough
to be played in pubs.

Coopedit will not work and quite a few custom maps won't work properly.
This is due to lots of changes in the map file format and does not mean,
that those custom maps can not be played in future game releases - they
just need to be reworked. See akimbo2 to check out the reworked maps, btw.
The old official maps and most conservative custom maps should be fine.

Due to some physics changes, players of the hotfix client will have some
advantages and some disadvantages compared to the regular clients, so DO
NOT USE THE HOTFIX CLIENT TO PLAY COMPETITIVELY.

By default, if an incompatible map is loaded in multiplayer, the client
will disconnect automatically. This can be disabled (disconnectonmaperror),
but will probably get you marked as cheater, because on incompatible maps,
model clipping may not work properly. Just stick to compatible maps...
2018-02-10 11:28:51 +01:00
aurhat a720a98faa Fix looking up on Mac using SDL 2.0.6 framework 2018-02-10 11:28:50 +01:00
ac-stefandaurhat 135f9f4a90 fully automatic keymap generation
If a key is not listed in keymap.cfg but SDL provides a good enough name
for the corresponding scancode, a keymap entry is generated automatically.

If a key can't be found when adding a bind, it is checked, if SDL can
resolve the key name. The resolved keybind is then used to recreate the
keymap entry - and the bind can succeed.

Some SDL names for scancodes may not be usable as keymap names: if the
name contains (, ), $ or ", it will be rejected. Also, SDL does not
provide names for all scancodes. Scancode names provided by SDL can be
platform-dependant, therefore recreating the bind may fail on a different
platform.

However, the feature should work fine with most nonstandard keys - and the
information written to clientlog can be used to amend keymap.cfg
2018-02-10 11:28:50 +01:00
ac-stefandaurhat e5077d0226 use both keycodes and scancodes of keypress events
If a keycode can not be found on the list from keymap.cfg a second search
is done for the scancode. This should be helpful to assign
layout-dependent keys with rare keycodes.

Also: use a hash table for the keys (instead of a list).

Add two new scan codes for dead keys on german layouts: LEFTOF1 and
LEFTOFDEL.
2018-02-10 11:28:50 +01:00
ac-stefandaurhat 19bb560dd2 more SDL2-related backports from sauer
* use keyrepeat and textinput switch code from sauer (on windows, opening
  a console with "t" also produced a "t" as text otherwise)
* screenw and screenh are now cubescript-variables that always reflect
  the actual resolution of the screen or the window

DOCREF screenw screenh
2018-02-10 11:28:49 +01:00
ac-stefandaurhat f0f8eac770 remove most platform dependent exceptions for SDL2 code
* switch travis to trusty
* new parameter fullscreendesktop: uses desktop resolution for fullscreen
* "colorbits" removed, since it's no longer supported
* scr_w/scr_h no longer necessarily reflect the true display resolution
  (with fullscreendesktop = 1 and fullscreen = 1, scr_w and scr_h are
  ignored)
* desktopw and desktoph are now guaranteed to have nonzero values
* fallback to old mouse behaviour when SDL_SetRelativeMouseMode fails
* require a click into the window to grab the mouse
* scr_w/scr_h default to desktop resolution on first run

thx sauerbraten :)

DOCREF fullscreendesktop colorbits
2018-02-10 11:28:49 +01:00
aurhat 8b144afb4e Upgrade VS project to SDL2
Used SDL2 v. 2.0.5 and SDL2_image v. 2.0.1
2018-02-10 11:28:49 +01:00
ac-stefandaurhat e75dfbe4c7 fix/finish SDL2 port
* implement gamma
* menu keys fixed
* add support for horizontal mousewheel and some more mouse buttons
* fix keyrepeat
* fix window resizing
* fix compiler warnings
* use SDL to access clipboard
* remove X11-dependency
* some surplus SDL headers removed
* fix setdesktopres
* fix vsync
* improve fullscreentoggle on linux
* remove togglegrab
2018-02-10 11:28:49 +01:00
Jani-Markus Maunusandaurhat f86579533a Ported AC to SDL2 2018-02-10 11:28:48 +01:00
aurhat f53f110926 Fix crash in client compiled in CB 17.12 on Windows
It happened for -O3 compiler flag.
2018-01-27 09:35:07 +01:00
Lee Salzman bda6248d23 always use scissor on reflections 2017-11-29 15:35:10 -05:00
Lee Salzman e58e8f2eb6 clear color and depth of reflection at same time 2017-11-29 15:23:31 -05:00
Jani-Markus Maunusandaurhat aba2657671 Restored old default value for reflectclip 2017-11-29 19:45:26 +01:00
Jani-Markus Maunusandaurhat a2b61a1792 Fixed HUD components appearing in water reflection
Clear the region on which the world is rendered (vertically flipped)
to create the reflection texture - otherwise regions not painted over
still contain data from the previous frame, including some HUD elements
in the bottom-left corner of the screen.
2017-11-29 19:45:16 +01:00
ac-stef 45bded0150 fix zipmod
avoid tripping asserts in VC
2017-11-22 20:25:34 +01:00
aurhat 830f8c0cf7 Cleanup
Thanks DADSGETNDOWN for the report for maps/mapmodel configs.
2017-11-18 14:04:59 +01:00
aurhat d3bd26a62d Fix animation during quicknadethrow attack
1. Before animation of the moving hand for throwing the grenade was cut,
now it's complete, like for normal grenade throw. To do that the code for
switching to previous weapon has changed location. selectweapon() isn't
used there, because if player has more grenades than 1, then after a throw
for a moment a grenade appeared in a hand, and just later previous weapon.
2. The changed code in quicknadethrow() prevents from shooting using right
mouse button, after starting to shoot quickly after grenade throw
(especially when player has more grenades than 1).
3. Also fixed resetting the "quicknade" variable.
2017-10-15 13:49:53 +02:00
aurhat 6ea3c499ce Remove involuntary shooting when switching weapons
It happened in case of automatic weapons.
2017-10-15 13:33:46 +02:00
aurhat d841896e7b Fix shooting during picking up akimbo
It prevents from shooting using right mouse button, when grenade was
activated and player picks up akimbo.
2017-10-15 13:29:50 +02:00
aurhat 4c2c511105 Fix grenade throwing when switching weapons
It fixes the problem that activated grenade disappeared during switching
the weapons, when player tried to throw grenade when time for grenade
cooking was almost finished.
2017-10-15 13:25:42 +02:00
aurhat 1d7dd9df84 Cleanup 2017-10-15 12:14:20 +02:00
aurhat 3e59a6305e Add grenade state of clients
For example that fixes grenade attack animation, when in demo mode player
is spectated from 1st-person position. Till now there were visible
2 incomplete movements of the hand for throwing - first after activating
a grenade, second during throwing. Now there is visible one complete
movement, like in multiplayer.
2017-10-11 00:21:26 +02:00