2531: Client: Support .map file drag-and-drop to open map in editor r=heinrich5991 a=def-
As suggested by Lady Saavik
Co-authored-by: def <dennis@felsin9.de>
2534: Fix utf8 handling in str_truncate (fixes#2533) r=Zwelf a=def-
and rename to str_utf8_truncate since it's only used for utf8 strings
Co-authored-by: def <dennis@felsin9.de>
2517: Fix sixup players not making sounds when hooking others r=Learath2 a=Fireball-Teeworlds
I've restructured the code to make it easier to read.
There are two differences in it's behavior:
1. Hook sounds coming from sixup players are now only muted for the player themselves (using a mask) instead of being muted for everyone. This fixes at least one cause for #2508.
2. Mask for `COREEVENT_GROUND_JUMP` is now using `Asker` parameter to `TeamMask()`. I believe it was originally an oversight that this mask was different from the others. But the difference is barely noticeable: one case is when spectating a Tee that is in a solo part. Previously such Tee wouldn't be making ground jumping sounds.
7e610f9944/src/game/server/teams.cpp (L405-L418)
I've tested this with DDNet and Vanilla (0.7) clients.
Co-authored-by: Fireball <fireball.teeworlds@gmail.com>
2472: Add function to show health and armor in nameplates. (mainly for server demo) r=def- a=sirius1242
The effect is as follows:
![effect image](https://user-images.githubusercontent.com/32300858/86894538-c6be2900-c135-11ea-832c-d4beaae36724.png)
- use `cl_nameplates_ha` to switch on-off. (default is off)
- use `cl_nameplates_ha_size` to adjust size of health and armor nameplates.
Mainly for server-side-recorded demos. If it can't get health and armor data, this will not be rendered.
Co-authored-by: sirius <sirius.ustc@gmail.com>
2515: Port some text.cpp fixes r=def- a=Fireball-Teeworlds
1ca020ea19912442347d
The first one fixes a stack-buffer-overflow in some UIs (closes#2511), the second one is just for consistent typing.
Co-authored-by: Fireball <fireball.teeworlds@gmail.com>
2512: Fix prediction when chatting while shooting/walking (fixes#2506) r=def- a=trml
Also fixed a case when switching to the dummy and back while holding fire (the reload timer should now stay in sync afterwards).
Co-authored-by: trml <trml@users.noreply.github.com>
2502: Improved dummy switching r=def- a=Fireball-Teeworlds
- Fix a use-after-free when there are no new snapshots for the cl_dummy tee after the switch: #2499 .
- When one of the tees is hooked, cycling through them will no longer show phantom hook for the other tee: https://youtu.be/mxVT4pdyGnU.
- Dummy switch might happen a bit quicker since it doesn't depend on receiving new snapshots.
- Simplified code: m_LastDummy2 is no more.
Co-authored-by: Fireball <fireball.teeworlds@gmail.com>
2501: Show "Free View" for Sixup r=fokkonaut a=Learath2
@fokkonaut is this enough?
bors delegate=fokkonaut
Co-authored-by: Learath <learath2@gmail.com>
2433: Fix votes for sixup r=heinrich5991 a=Learath2
I think this looks sane but I haven't tested it at all for idk how to even test this locally/alone
2505: Fix legacy 64 player serverinfo, don't send duplicate packets (fixes#2495) r=heinrich5991 a=def-
For legacy we sent the first packet once correctly, then the 2nd and 3rd
packet without the marker and token at the start, so they never worked.
For new 64 player serverinfo we sent all packets correctly but the 1st
packet twice.
Introduced in #1955.
2506: Prevent whisper spam from 0.7 (fixes#2504) r=heinrich5991 a=def-
Co-authored-by: Learath <learath2@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
2493: Fix compiler warning in stoppers without changing physics r=heinrich5991 a=def-
Probably related to #2487, was previously fixed and caused stoppers not to work.
```
src/game/collision.cpp:902:247: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]
src/game/collision.cpp:891:252: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]
src/game/collision.cpp:885:251: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]
```
Co-authored-by: def <dennis@felsin9.de>
2494: Persian update by Quick r=def- a=def-
Not sure if the missing empty lines inbetween matter, can fix later.
Co-authored-by: def <dennis@felsin9.de>
For legacy we sent the first packet once correctly, then the 2nd and 3rd
packet without the marker and token at the start, so they never worked.
For new 64 player serverinfo we sent all packets correctly but the 1st
packet twice.
Introduced in #1955.
- Fix a use-after-free when there are no new snapshots for the cl_dummy tee after the switch.
- When one of the tees is hooked, cycling through them will no longer show phantom hook for the other tee.
- Dummy switch might happen a bit quicker since it doesn't depend on receiving new snapshots.
- Simplified code: m_LastDummy2 is no more.
Probably related to #2487, was previously fixed and caused stoppers not
to work.
src/game/collision.cpp:902:247: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]
src/game/collision.cpp:891:252: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]
src/game/collision.cpp:885:251: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]
2490: Don't request IUpdater interface when built without updater r=heinrich5991 a=def-
Fixes warning:
[kernel]: failed to find interface with the name 'updater'
Co-authored-by: def <dennis@felsin9.de>
2478: Use (u)int64 from system.h instead of (u)int64_t from cstdint r=heinrich5991 a=def-
src/game/client/prediction/gameworld.h:62:90: error: ‘int64_t’ has not been declared
62 | void CreateExplosion(vec2 Pos, int Owner, int Weapon, bool NoDamage, int ActivatedTeam, int64_t Mask);
| ^~~~~~~
2480: Send zoom status for dummy too r=heinrich5991 a=def-
Co-authored-by: def <dennis@felsin9.de>
2485: Find available port by MikiGamer r=heinrich5991 a=def-
Same as https://github.com/ddnet/ddnet/pull/2419 but rebased so that you can actually look at the diff. @MikiGamer
Co-authored-by: MikiGamer <35080830+MikiGamer@users.noreply.github.com>
Co-authored-by: def <dennis@felsin9.de>