• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Révision94653347c173ab95970fcc92dd5e351e1f23e39f (tree)
l'heure2016-02-11 21:20:59
AuteurSUEHIRO <supersuehiro@user...>
CommiterSUEHIRO

Message de Log

explodのvelocity適用が1フレ遅れていなかった

Change Summary

Modification

--- a/ssz/char.ssz
+++ b/ssz/char.ssz
@@ -5521,55 +5521,36 @@ public void Explod::update(bool oVer, int playerNo)
55215521 ret;
55225522 }
55235523 }
5524- float scl = 1.0;
55255524 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+ }
55345546 else:
55355547 {
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);
55435551 }
55445552 }
55455553 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- }
55735554 branch{
55745555 type _t = $void(.anims.self=);
55755556 ~_t aal = [_t(a=){
@@ -5584,7 +5565,7 @@ public void Explod::update(bool oVer, int playerNo)
55845565 }
55855566 .addAnimList(
55865567 a=, `ani, `sprpriority, `x, `y, screen,
5587- (float)`facing*`scalex*scl, (float)`vfacing*`scaley*scl,
5568+ (float)`facing*`scalex, (float)`vfacing*`scaley,
55885569 0.0, false, oVer, 1.0, 1.0, `alphas < 0 ? (int)-1 : `alphas,
55895570 `alphad, playerNo == .superplayer,
55905571 pfx, `shadowr<<16 | (`shadowg&255)<<8 | (`shadowb&255),
@@ -5595,19 +5576,33 @@ public void Explod::update(bool oVer, int playerNo)
55955576 else:
55965577 aal(:.anims=:);
55975578 }
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;
56065595 }
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;
56105603 }
5604+ `ani~ani.action();
5605+ `time++;
56115606 }
56125607 }
56135608 public void Explod::setPos(&.Char c=)