Skip to content

Commit fac59fa

Browse files
committed
probably fix reseting builder build tile/blob after dashing
1 parent fa54d20 commit fac59fa

File tree

1 file changed

+10
-5
lines changed
  • Base/Entities/Characters/Scripts/Dash

1 file changed

+10
-5
lines changed

Base/Entities/Characters/Scripts/Dash/Dash.as

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "KnightCommon.as";
1313
#include "KnockedCommon.as"
1414
#include "BindingsCommon.as"
15+
#include "PlacementCommon.as";
1516

1617
void onInit(CBlob@ this) {
1718
this.addCommandID("sync dash values");
@@ -85,7 +86,7 @@ void onTick(CBlob@ this) {
8586

8687
// disable dashing, when knight or archer charging his attack
8788
// also block dashing while knight is trying to dash with gliding state
88-
// also clear selected block/tool for builder
89+
// also clear selected build block/blob for builder
8990
if (this.getConfig() == "archer") {
9091
if (this.isKeyPressed(key_action1)) return;
9192
} else if (this.getConfig() == "knight") {
@@ -98,10 +99,14 @@ void onTick(CBlob@ this) {
9899
if (knight.state == KnightStates::shieldgliding) return;
99100
} else if (this.getConfig() == "builder") {
100101
this.set_u8("bunnie_tile", 255);
101-
102-
CBitStream kekrams;
103-
kekrams.write_u8(255);
104-
this.SendCommand(this.getCommandID("tool clear"));
102+
this.set_u8("buildblob", 255);
103+
this.set_TileType("buildtile", 0);
104+
105+
CBlob@ blob = this.getCarriedBlob();
106+
if (blob !is null && blob.hasTag("temp blob")) {
107+
blob.Untag("temp blob");
108+
blob.server_Die();
109+
}
105110
}
106111

107112
// disallow dashing with items in hands

0 commit comments

Comments
 (0)