Page MenuHomeSchine - Phabricator

Starmade | max hp to byte rounds down
Closed, FinishedPublic

Description

Block HP can be set to any positive value, and this gets converted back to be between [1, 127].
In this conversion process, it currently rounds down at all times which results in tiny weaponry able to still harm strong blocks.

A block set to 100 000 max hp can receive 1 cannon damage and it would be rounded down to 126 when the real value is something like 126.99. This results in this tiny projectile dealing 787 damage in comparison.

This is an extreme example, and here the block should simply be unharmed. Normal rounding applied here would be best where 126.5 or above becomes 127 again. and 126.4999 or below becomes 126. You would need to apply at least 393 damage in this example to harm the armor block and although that is still not close to the required 787 damage, it's the best solution to allow HP values to exceed 127.

Details

Commits
Restricted Diffusion Commit
Task Type
Bug
Testing Results
Affected Gamemode(s)
Single and Multi
Reproducible
Yes
Last tested (version)
0.201.089
Category
Control Block System: Weapons
First occurrence (version)
0.200.335+
Hardware/Software/System
OS-Specific
No
Hardware-Specific
No
Video Card Vendor
uncertain
Steps to reproduce
  1. shoot a 1 damage weapon at a block with 100 000 hp
  2. you will harm it because of it rounding down when converting back to byte
Serverconfig (server.cfg)
<replace this line with the file content>
Clientconfig (settings.cfg)
<replace this line with the file content>

Event Timeline

lancake created this task.Apr 15 2018, 3:10 PM
lancake created this object in space Restricted Space.
Restricted Application added a project: CBS: Weapons. · View Herald TranscriptApr 15 2018, 3:10 PM
schema added a commit: Restricted Diffusion Commit.Apr 17 2018, 4:52 PM
schema changed the task status from In Queue to Resolved by committing Restricted Diffusion Commit.
Restricted Application edited projects, added Quality Assurance; removed Game Development. · View Herald TranscriptApr 17 2018, 4:52 PM
Restricted Application added a subscriber: AndyP. · View Herald Transcript
lancake closed this task as Closed.

-QA Testing-

Fix confirmed.

Restricted Application removed a project: Quality Assurance. · View Herald TranscriptJun 28 2018, 9:07 PM
Restricted Application removed a subscriber: AndyP. · View Herald Transcript
lancake shifted this object from the Restricted Space space to the S3 Starmade space.Jun 28 2018, 9:07 PM
lancake changed Last tested (version) from 0.200.335+ to 0.201.089.