Révision | 94653347c173ab95970fcc92dd5e351e1f23e39f (tree) |
---|---|
l'heure | 2016-02-11 21:20:59 |
Auteur | SUEHIRO <supersuehiro@user...> |
Commiter | SUEHIRO |
explodのvelocity適用が1フレ遅れていなかった
@@ -5521,55 +5521,36 @@ public void Explod::update(bool oVer, int playerNo) | ||
5521 | 5521 | ret; |
5522 | 5522 | } |
5523 | 5523 | } |
5524 | - float scl = 1.0; | |
5525 | 5524 | bool screen = false; |
5526 | - if(`bindtime != 0) branch{ | |
5527 | - cond `postype >= 4: | |
5528 | - screen = true; | |
5529 | - `x = | |
5530 | - `offsetx + ( | |
5531 | - `postype == 4 | |
5532 | - ? -(float).com.GameWidth/2.0 : (float).com.GameWidth/2.0); | |
5533 | - `y = `offsety; | |
5525 | + branch{ | |
5526 | + cond `bindtime != 0: | |
5527 | + branch{ | |
5528 | + cond `postype >= 4: | |
5529 | + screen = true; | |
5530 | + `x = | |
5531 | + `offsetx + ( | |
5532 | + `postype == 4 | |
5533 | + ? -(float).com.GameWidth/2.0 : (float).com.GameWidth/2.0); | |
5534 | + `y = `offsety; | |
5535 | + else: | |
5536 | + { | |
5537 | + ^&.Char bc = .players.get(`bindid); | |
5538 | + if(#bc == 0){ | |
5539 | + `bindtime = 0; | |
5540 | + break, break; | |
5541 | + } | |
5542 | + if(!.m.isnan(`offsetx)) `x = bc~drawX+bc~offsetX() + `offsetx; | |
5543 | + if(!.m.isnan(`offsety)) `y = bc~drawY+bc~offsetY() + `offsety; | |
5544 | + } | |
5545 | + } | |
5534 | 5546 | else: |
5535 | 5547 | { |
5536 | - ^&.Char bc = .players.get(`bindid); | |
5537 | - if(#bc == 0){ | |
5538 | - `bindtime = 0; | |
5539 | - break, break; | |
5540 | - } | |
5541 | - if(!.m.isnan(`offsetx)) `setX(bc~drawX+bc~offsetX() + `offsetx); | |
5542 | - if(!.m.isnan(`offsety)) `setY(bc~drawY+bc~offsetY() + `offsety); | |
5548 | + float sp = .com.tickInterpola(); | |
5549 | + `x = `ticNewX - (`ticNewX - `ticOldX) * (1.0 - sp); | |
5550 | + `y = `ticNewY - (`ticNewY - `ticOldY) * (1.0 - sp); | |
5543 | 5551 | } |
5544 | 5552 | } |
5545 | 5553 | if(.com.tickFrame() && act) `ani~ani.updateSprite(); |
5546 | - if(act && `bindtime == 0){ | |
5547 | - if(.com.tickFrame()){ | |
5548 | - `ticOldX = `x; | |
5549 | - `ticNewX = `x + `velocityx*(float)(`facing*`relativef); | |
5550 | - `ticOldY = `y; | |
5551 | - `ticNewY = `y + `velocityy; | |
5552 | - } | |
5553 | - float sp = .com.tickInterpola(); | |
5554 | - `x = `ticNewX - (`ticNewX - `ticOldX) * (1.0 - sp); | |
5555 | - `y = `ticNewY - (`ticNewY - `ticOldY) * (1.0 - sp); | |
5556 | - } | |
5557 | - if(.com.tickNextFrame()){ | |
5558 | - if(`bindtime > 0){ | |
5559 | - `bindtime--; | |
5560 | - if(act && `bindtime == 0){ | |
5561 | - `x += `velocityx*(float)(`facing*`relativef); | |
5562 | - `y += `velocityy; | |
5563 | - } | |
5564 | - } | |
5565 | - if(!act) break; | |
5566 | - if(`bindtime == 0){ | |
5567 | - `velocityx += `accelx; | |
5568 | - `velocityy += `accely; | |
5569 | - } | |
5570 | - `ani~ani.action(); | |
5571 | - `time++; | |
5572 | - } | |
5573 | 5554 | branch{ |
5574 | 5555 | type _t = $void(.anims.self=); |
5575 | 5556 | ~_t aal = [_t(a=){ |
@@ -5584,7 +5565,7 @@ public void Explod::update(bool oVer, int playerNo) | ||
5584 | 5565 | } |
5585 | 5566 | .addAnimList( |
5586 | 5567 | a=, `ani, `sprpriority, `x, `y, screen, |
5587 | - (float)`facing*`scalex*scl, (float)`vfacing*`scaley*scl, | |
5568 | + (float)`facing*`scalex, (float)`vfacing*`scaley, | |
5588 | 5569 | 0.0, false, oVer, 1.0, 1.0, `alphas < 0 ? (int)-1 : `alphas, |
5589 | 5570 | `alphad, playerNo == .superplayer, |
5590 | 5571 | pfx, `shadowr<<16 | (`shadowg&255)<<8 | (`shadowb&255), |
@@ -5595,19 +5576,33 @@ public void Explod::update(bool oVer, int playerNo) | ||
5595 | 5576 | else: |
5596 | 5577 | aal(:.anims=:); |
5597 | 5578 | } |
5598 | - if(screen && `bindtime == 0 && .com.tickNextFrame()){ | |
5599 | - switch(`postype){ | |
5600 | - case 4://left | |
5601 | - `setX(.com.screenx + `offsetx/.com.scale); | |
5602 | - `setY(.com.screeny + `offsety/.com.scale); | |
5603 | - case 5://right | |
5604 | - `setX(.com.screenx + ((float).com.GameWidth + `offsetx)/.com.scale); | |
5605 | - `setY(.com.screeny + `offsety/.com.scale); | |
5579 | + if(.com.tickNextFrame()){ | |
5580 | + if(`bindtime > 0) `bindtime--; | |
5581 | + if(screen && `bindtime == 0){ | |
5582 | + switch(`postype){ | |
5583 | + case 4://left | |
5584 | + `x = .com.screenx + `offsetx / .com.scale; | |
5585 | + `y = .com.screeny + `offsety / .com.scale; | |
5586 | + case 5://right | |
5587 | + `x = .com.screenx + ((float).com.GameWidth + `offsetx) / .com.scale; | |
5588 | + `y = .com.screeny + `offsety / .com.scale; | |
5589 | + } | |
5590 | + } | |
5591 | + if(!act){ | |
5592 | + `setX(`x); | |
5593 | + `setY(`y); | |
5594 | + break, break; | |
5606 | 5595 | } |
5607 | - if(act){ | |
5608 | - `x += `velocityx*(float)(`facing*`relativef); | |
5609 | - `y += `velocityy; | |
5596 | + if(`bindtime == 0){ | |
5597 | + `ticOldX = `x; | |
5598 | + `ticNewX = `x + `velocityx * (float)(`facing * `relativef); | |
5599 | + `ticOldY = `y; | |
5600 | + `ticNewY = `y + `velocityy; | |
5601 | + `velocityx += `accelx; | |
5602 | + `velocityy += `accely; | |
5610 | 5603 | } |
5604 | + `ani~ani.action(); | |
5605 | + `time++; | |
5611 | 5606 | } |
5612 | 5607 | } |
5613 | 5608 | public void Explod::setPos(&.Char c=) |