diff --git a/.efrocachemap b/.efrocachemap index 64d0393d..74d83a3e 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4135,16 +4135,16 @@ "assets/build/windows/x64/vc_redist.x64.exe": "https://files.ballistica.net/cache/ba1/ea/19/8b8787d81abcdce158ba608cd24f", "assets/build/windows/x64/vcruntime140_1d.dll": "https://files.ballistica.net/cache/ba1/11/d8/ff6344b429b00c24d9a1930d4338", "assets/build/windows/x64/vcruntime140d.dll": "https://files.ballistica.net/cache/ba1/20/33/0825e11e6518f87ece3009309933", - "build/prefab/linux-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b8/7d/8fb23522c5431b80f43518d52bc1", - "build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2b/1b/a7c5f57925c5af6c4af7fb144f03", - "build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/84/e3/a6538c8ae4861d182eeb435d9918", - "build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/18/7a/02301ecf6287c8103d72a18702a5", - "build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ee/07/cf35aa850c673b3c505d62ec4435", - "build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9e/5c/64299df2b8eb147cc19e1d3035a1", - "build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/f4/ed/216d2257dd2b421c4e4d060c0d33", - "build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/07/6f/ec5b94e8089a56a01f97c90fb2f9", - "build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/f4/09/8c42bebbfb28b1ebb060a7e9f0c7", - "build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/ff/43/ec16a091f0b9cfb77e9f7bab1f25", - "build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/20/42/1f9000faf46cb8de8db34aac2178", - "build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/b7/86/f2da432d7b177d9556c577fa6391" + "build/prefab/linux-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/05/0d/bc658d9bcf94d07bde0812c3f4a7", + "build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2f/ce/d2018415a449ad310a68970ac848", + "build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/4e/60/bbf2bf14e58835ea71897366674c", + "build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/7b/7b/5c7d8989c1cf1a34c3b84390d26d", + "build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d2/33/f26482f85d7e3fe349badc83fb38", + "build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/24/30/0a93d6fb06eaf30e698900f7719f", + "build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c9/7f/d3d4952829448c53ad93c4a7a7f6", + "build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/64/40/0e1838ce963ebc0ff5927d2ef096", + "build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/3b/3b/13e222119a4fae02a43ebca3a2e1", + "build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/5b/90/2f7e0be10cf2e4681902b1dbfac5", + "build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/8e/76/6b1a723d85bc9fd81ca44f71c653", + "build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/11/cd/8152982a3b7f9970cde209470f9c" } \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index b17b8450..7a0a5ed2 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -10,3 +10,7 @@ ### Roman Trapeznikov - Bug fixes and code cleanup + +### Benefit-Zebra +- Unofficial BombSquad Bug Finder +- Code Cleanup diff --git a/assets/src/ba_data/python/bastd/actor/bomb.py b/assets/src/ba_data/python/bastd/actor/bomb.py index 9d2ff2a5..fd4fa485 100644 --- a/assets/src/ba_data/python/bastd/actor/bomb.py +++ b/assets/src/ba_data/python/bastd/actor/bomb.py @@ -718,10 +718,16 @@ class Bomb(ba.Actor): # By default our hit type/subtype is our own, but we pick up types of # whoever sets us off so we know what caused a chain reaction. + # UPDATE (July 2020): not inheriting hit-types anymore; this causes + # weird effects such as land-mines inheriting 'punch' hit types and + # then not being able to destroy certain things they normally could, + # etc. Inheriting owner/source-node from things that set us off + # should be all we need I think... self.hit_type = 'explosion' self.hit_subtype = self.bomb_type # The node this came from. + # FIXME: can we unify this and source_player? self.owner = owner # Adding footing-materials to things can screw up jumping and flying @@ -1005,12 +1011,13 @@ class Bomb(ba.Actor): ba.playsound(factory.activate_sound, 0.5, position=self.node.position) def _handle_hit(self, msg: ba.HitMessage) -> None: - ispunch = (msg.srcnode and msg.srcnode.getnodetype() == 'spaz') + ispunched = (msg.srcnode and msg.srcnode.getnodetype() == 'spaz') # Normal bombs are triggered by non-punch impacts; # impact-bombs by all impacts. - if (not self._exploded and not ispunch - or self.bomb_type in ['impact', 'land_mine']): + if (not self._exploded and + (not ispunched or self.bomb_type in ['impact', 'land_mine'])): + # Also lets change the owner of the bomb to whoever is setting # us off. (this way points for big chain reactions go to the # person causing them). @@ -1021,13 +1028,15 @@ class Bomb(ba.Actor): # Also inherit the hit type (if a landmine sets off by a bomb, # the credit should go to the mine) # the exception is TNT. TNT always gets credit. - if self.bomb_type != 'tnt': - self.hit_type = msg.hit_type - self.hit_subtype = msg.hit_subtype + # UPDATE (July 2020): not doing this anymore. Causes too much + # weird logic such as bombs acting like punches. Holler if + # anything is noticeably broken due to this. + # if self.bomb_type != 'tnt': + # self.hit_type = msg.hit_type + # self.hit_subtype = msg.hit_subtype - ba.timer(100 + int(random.random() * 100), - ba.WeakCall(self.handlemessage, ExplodeMessage()), - timeformat=ba.TimeFormat.MILLISECONDS) + ba.timer(0.1 + random.random() * 0.1, + ba.WeakCall(self.handlemessage, ExplodeMessage())) assert self.node self.node.handlemessage('impulse', msg.pos[0], msg.pos[1], msg.pos[2], msg.velocity[0], msg.velocity[1],