Commit graph

322 commits

Author SHA1 Message Date
fokkonaut 5deeb299fa Add DDNetLaser to have more info about a laser shot 2022-09-15 01:01:32 +02:00
heinrich5991 6907895ee5 Add LASERTYPE enum 2022-09-15 00:58:08 +02:00
VoxelDoesCode fa98ad1e36 Remove the need for file_icons.png 2022-08-19 01:05:02 -04:00
VoxelDoesCode a1617dcf56 Replace all images with unicode chars 2022-08-17 03:58:13 -04:00
bors[bot] f8fca99e62
Merge #5642
5642: Option to remove weak hook & bounce r=def- a=Jupeyy

Fixes #5641 
server side only

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2022-08-09 13:59:21 +00:00
Dennis Felsing 06a971bcd1 Fix rest of pylint manually 2022-07-27 09:37:25 +02:00
Dennis Felsing 9f8e97fbeb Run flynt -a 2022-07-27 09:37:24 +02:00
def 7379a64004 [WIP] Require Python 3.6 (f-strings) and fix pylints
So far only done scripts directory, will do the rest if this is
considered good
2022-07-27 09:37:24 +02:00
Jupeyy 88c4b69301 Add an option to remove weak hook & bounce 2022-07-21 17:04:16 +02:00
Robert Müller ba1608529e Move message copy inside SendPackMsgTranslate
Fix clang warning: Address of stack memory associated with local variable 'aBuf' is still referred to by the stack variable 'tmp' upon returning to the caller.  This will be a dangling reference [clang-analyzer-core.StackAddressEscape]

Mark the input parameters as const pointers and mark the protocol message `Pack` methods as const.
2022-07-11 19:02:16 +02:00
c0d3d3v e3fc71d051
Rename "NoSomething" to "SomethingDisabled" 2022-07-11 13:40:01 +02:00
Chairn a69dc599a9 Huge variable naming format
Fix pointer and pointer array variable naming

Huge renaming to match our rules

Used regex: (?!(return|delete)\b)\b\w+ (m_|ms_|g_|gs_|s_)[^a]\w+\[
            (?!(return|delete)\b)\b\w+ (?!(m_|ms_|g_|gs_|s_))[^a]\w+\[

Further format static variables

Format almost all pointer names accordingly

Used regex: (?!(return)\b)\b\w+
\*(?!(m_p|p|s_p|m_ap|s_ap|g_p|g_ap|ap|gs_ap|ms_ap|gs_p|ms_p))\w+\b[^:\(p]

clang-format

Fix CI fail

Fix misnamed non pointer as pointer and non array as array

Used regex: (?!(return|delete)\b)\b\w+ (m_|ms_|g_|gs_|s_)p\w+\b
            (?!return\b)\b\w+ (ms_|m_|g_|gs_|s_)a\w+\b[^\[]

clang-format

Revert to SCREAMING_SNAKE_CASE and reinstate dead code
2022-07-08 18:01:29 +02:00
c0d3d3v eea0615ba2
refactor compile.py 2022-06-27 01:11:21 +02:00
c0d3d3v 917e9f1e96
remove unused python code 2022-06-27 01:11:21 +02:00
c0d3d3v 59436b5e6d
Add default values to extended Net Objects 2022-06-27 01:11:19 +02:00
c0d3d3v f819afed6c
Print also extended NetObj and NetMsg Names
Show External NetObjects in Snapshot stats
2022-06-27 01:10:37 +02:00
c0d3d3v 4729fa9467
Match PACKER_BUFFER_SIZE when using SecureUnpackMsg 2022-06-27 01:10:37 +02:00
c0d3d3v 07cfda5593
remove rampvalue from ddnetcharacter 2022-06-27 01:10:37 +02:00
c0d3d3v df52df9d4a
move DDNetCharacterDisplayInfo to DDNetCharacter
- add default value option to NetworkValues
- rename m_FreezeTick to m_FreezeStart
2022-06-27 01:10:25 +02:00
bors[bot] 1e31db257f
Merge #5420
5420: Improvments for new HUD r=def- a=C0D3D3V

for testing set `#define CLIENT_VERSIONNR 16020`
Some of the changes are only available in the next version

Impressions: https://youtu.be/E770vGp4KKY

Implements a few of the recommendations from https://github.com/ddnet/ddnet/issues/5159 and Discord
- removes all player capability messages send by the server, that are now displayed in the HUD
- ~~remove `cl_ddrace_hud` and cl_show_freeze_bars~~, 
- Added option `cl_freezebars_alpha_inside_freeze` setting to change the opacity if the player is inside a freeze tile (default visible 100%)
- Added option `cl_show_jumps_indicator`
- We send now the real weapon the player is holding if he is frozen
    -> for that we added a new particle "snow flakes" or frozen flakes :D that are spawned over the tees body, to indicate he is frozen.
    -> new extras.png asset (+ corresponding asset tab, that can potentially be used for all sorts of extras for our mod, e.g. material particles, but in the future maybe also for other mods using a similar structure like it is for entities)
- stars are no longer send to new clients, because it is duplication to the freezebar, and we decided to not allow to disable it 
- also ninja stars are no longer send. They are not vanilla, and we now have a ninja bar in the new HUD.
- display target angle from 0 to 360 (looks mirrored on the x-axis to the normal trigonometry circle, but that is just how the world coordinates are) 
- dummy action display is increased in size ( but only the border margin :D not the icons. so the icons are still the same size as the icons on the left side)
- allow the server to also show old HUD elements (see https://github.com/ddnet/ddnet/pull/5427 for screenshots)


fixes #5149
fixes #198
closes #5159

fixes #2252   ~~(But not clear if we should also display the weapon, still investigating)~~
- we do no longer display a weapon inside freeze, instead we have nice freeze particles

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [x] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [x] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
2022-06-26 07:57:33 +00:00
c0d3d3v 4281df2429
Add new textures by ravie; Also add no gun hit for teleport gun 2022-06-25 16:05:38 +02:00
Robert Müller 0a4b1b9a7b Organize generated protocol includes 2022-06-17 17:39:24 +02:00
c0d3d3v f28b71d5cc
allow the server to also show old HUD elements (by @fokkonaut) 2022-06-15 22:05:43 +02:00
c0d3d3v 2475e844e0
Add extras texture + asset tab 2022-06-15 22:03:52 +02:00
c0d3d3v 5cd0cc6040
send the weapon the player is really holding (except for ninjajetpack)
and render ninja skin in client if player is frozen

Do stll change the emote if a player with normal emote is freezed
2022-06-15 22:01:46 +02:00
ChillerDragon 3667061b68 Use nullptr in generated and editor
-Wzero-as-null-pointer-constant
2022-06-13 18:28:13 +02:00
trml 882ddae201 Send switch timing info in extended switch state netobject 2022-06-02 01:04:34 +02:00
trml 548de3804e Rename NumSwitchers to HighestSwitchNumber and remove most references 2022-06-02 00:57:11 +02:00
trml 66c0c1e692 Send timer info for switchers and predict switch state changes 2022-06-02 00:57:09 +02:00
trml 940205b3cc Simplify switch state using NetArray 2022-06-02 00:46:17 +02:00
Robert Müller 8f260caa9f Remove duplicated includes from generated protocol 2022-05-29 13:49:44 +02:00
c0d3d3v d6833b6fd6
fix jump display 2022-05-16 23:17:19 +02:00
c0d3d3v 796b2add95
Fix Weapon Shields rendering and Clean up Sprite Offsets in items.cpp 2022-05-16 15:31:46 +02:00
c0d3d3v fa2ac1bb64
Merge branch 'master' into New_HUD
* master: (87 commits)
  Remove base/tl/string.h
  Replace remaining usage of base/tl/string with std::string
  Remove unused includes of base/tl/string.h
  Store localized strings in a CHeap instead of using tl/string.h
  Mark methods as const
  Add CHeap::StoreString method
  Rules are chat responses too
  Add margins to demo slice popup, decrease error font size, UI scaling
  Remove redundant parameters which are overridden later
  Use Margin instead of both VMargin and HMargin
  Move variable declaration
  Only output messages intended for chat to the user of a chat command
  Remove unused chat response variables
  Don't print the first "Waiting for score threads to complete"
  fix usage of undefined behavior for default eyes
  remove duplicate HOOK_RETRACTED assignment
  do not send swap request notification to complete team 0
  make swap messages more personal
  Move ninja shield to other position (fixes #5047)
  do not release the hooks if you swap
  ...
2022-05-10 19:03:09 +02:00
def 6dc6d44844 Move ninja shield to other position (fixes #5047)
Quick fix for now, until c0d3d3v's new HUD is done, then could be moved
to a new graphics file entirely.
2022-04-30 11:42:26 +02:00
Dennis Felsing 298287fb4e Implement shields that remove specific weapon (fixes #4572)
Thanks to Cellegen for graphics.

Functionality works, still a bit buggy sprite display, maybe someone can
quickly spot what I'm doing wrong
2022-04-28 16:49:32 +02:00
c0d3d3v a9c8b344a2
Player position, speed and angle can now be displayed in the HUD.
- Added RenderMovementInformation() to the HUD
- Use m_Width instead of recalculating the display width each time in hud.cpp
- Reworked Debug HUD:
    - Display velspeed.x*ramp and velspeed.y instead of velspeed*ramp
    - Show unit of speed
    - The graph for the velspeed.x*ramp behavior (if dbg_tuning is active) is now nicer and usable. A second graph zooming in on the turning point has been added.
    - The velspeed.x*ramp graph will be redrawn only when new tuning parameters are added
- The target angle used to draw the tees is now calculated using the m_TargetX, m_TargetY in DDNetCharacterDisplayInfo if available.
- Added m_TargetX, m_TargetY and m_RampValue to DDNetCharacterDisplayInfo Snap (m_RampValue has a precision of one thousandth)
- Added CGraph::InsertAt() to create static Graphs
- Added "assets/hud" to initial created Directories
- Added Settings to hide Dummy Action HUD and Player Movement HUD cl_showhud_dummy_actions, cl_showhud_player_position, cl_showhud_player_speed, cl_showhud_player_angle
- Added Pointer to m_PrevExtendedDisplayInfo, for calculation of interpolated Angle in Player Rendering
- Added GetDigitsIndex(int Value, float Max); to hud.cpp
2022-04-14 13:42:19 +02:00
c0d3d3v 940047fb8e
Add Practice Mode Symbol next to the timer
- Add new hud.png
- expand DDNetCharacterDisplayInfo with m_IsInPracticeMode
2022-04-14 13:40:45 +02:00
c0d3d3v 670da66ec1
add vertical ninja bar 2022-04-14 13:40:44 +02:00
c0d3d3v e71578e468
Add DDNetCharacterDisplayInfo NetObj
- Show all components of new HUD also in Spectator (Ninja Bar, Freeze
  Bar and Jumps)
- hide freeze bar if you sit in freeze
2022-04-14 13:40:40 +02:00
c0d3d3v 78a0a3d31e
add deep and live frozen display 2022-04-14 13:38:56 +02:00
c0d3d3v 7abeaf0cd7
Preparations for the new HUD
- add pickup sprites to 0.6 data source
- New Enum for the 4 pickup categories
- Remove the unnecessary access to client_data7 for the pickup sprites
- Use the correct sprite set for the HUD sprites
- Read existing weapons into m_Predicted so that this information matches the last snap if the CCharacter is not predicted
- Move m_aWeapons from CCharacter to CCharacterCore for a more consistent data model since it was previously defined twice in the server and client (further so that it can be accessed with m_Predicted)
- Read CNetObj_Character into m_Predicted so that this information matches the last snap if the CCharacter is not predicted.
2022-04-14 13:38:55 +02:00
c0d3d3v 755c260401
Add HUD Sprites, LoadHudSkin() and HUD Assets Tab 2022-04-14 13:38:42 +02:00
Chairn 7224331f7f Added extern to protocolglue arrays 2022-04-03 02:34:45 +02:00
Jupeyy 343a5291e5 Replace browse icons with icon font 2022-03-19 18:35:43 +01:00
Redix a121a53e26 Fix validation range of m_HookedPlayer in character snap items 2022-02-19 20:08:05 +01:00
Redix 5efa50ca28 Validate variables of the snap-item base class 2022-02-19 20:08:05 +01:00
heinrich5991 620d611521 Add "groundjump-only" tile
Works by setting the airjump tiles' jumps to 255.
2022-02-05 23:53:32 +01:00
Wohoo 2017464282 Livefreeze implementation with CHARACTERFLAG_NO_MOVEMENTS flag.
Freeze and Unfreeze tiles added to switch layer too.
2022-01-07 16:53:40 +01:00
trml 71e5b7ed3a Fix switch state for super, cleanup door snapping, add dragger/gun/light 2021-10-14 22:59:39 +02:00