• 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évisionfd70706d9afd3d7f296b6397fb086ac71f90377e (tree)
l'heure2016-01-20 17:01:38
AuteurSUEHIRO <supersuehiro@user...>
CommiterSUEHIRO

Message de Log

gethitvar(xoff)が累積しないのを修正

Change Summary

Modification

--- a/ssz/char.ssz
+++ b/ssz/char.ssz
@@ -1002,16 +1002,6 @@ void appendToClipboard(int p, ^/char formatText, ^&.Var vars)
10021002 public float yvel;
10031003 public float yaccel;
10041004 public int hitid;
1005- public float mindistx;
1006- public float maxdistx;
1007- public float mindisty;
1008- public float maxdisty;
1009- public float snapx;
1010- public float snapy;
1011- public int snapt;
1012- public short snapf;
1013- public bool snapfx;
1014- public bool snapfy;
10151005 public float xoff;
10161006 public float yoff;
10171007 public &.Fall fall;
@@ -1044,16 +1034,6 @@ void appendToClipboard(int p, ^/char formatText, ^&.Var vars)
10441034 `yvel = 0.0;
10451035 `yaccel = 0.0/0.0;
10461036 `hitid = -1;
1047- `mindistx = 0.0/0.0;
1048- `maxdistx = 0.0/0.0;
1049- `mindisty = 0.0/0.0;
1050- `maxdisty = 0.0/0.0;
1051- `snapx = 0.0/0.0;
1052- `snapy = 0.0/0.0;
1053- `snapf = 1;
1054- `snapfx = false;
1055- `snapfy = false;
1056- `snapt = 0;
10571037 `fall.clear();
10581038 `player = -1;
10591039 `fallf = false;
@@ -1224,13 +1204,6 @@ void appendToClipboard(int p, ^/char formatText, ^&.Var vars)
12241204 `hb.fall = hit.fall;
12251205 `fallTime = 0;
12261206 `hb.yaccel = hit.yaccel;
1227- `hb.mindistx = hit.mindistx;
1228- `hb.maxdistx = hit.maxdistx;
1229- `hb.mindisty = hit.mindisty;
1230- `hb.maxdisty = hit.maxdisty;
1231- `hb.snapx = hit.snapx;
1232- `hb.snapy = hit.snapy;
1233- `hb.snapt = hit.snapt;
12341207 if(hit.forcenofall) fall = false;
12351208 `hb.groundtype = (int)hit.ground_type;
12361209 `hb.airtype = (int)hit.air_type;
@@ -3042,56 +3015,6 @@ public &Char
30423015 `stVal.mov = .MovTy::H;
30433016 if(`sysivar[.iHITPAUSETIME] > 0) `stVal.clearWw();
30443017 `sysivar[.iHITPAUSETIME] = 0;
3045- double snapx = 0.0/0.0;
3046- double snapy = 0.0/0.0;
3047- if(!.m.isnan(`stVal.hb.mindistx)) branch{
3048- cond `stVal.hb.snapf < 0:
3049- if(`sysfvar[.fX] > (`stVal.hb.snapx - `stVal.hb.mindistx)){
3050- snapx = `stVal.hb.snapx - `stVal.hb.mindistx;
3051- }
3052- else:
3053- if(`sysfvar[.fX] < (`stVal.hb.snapx + `stVal.hb.mindistx)){
3054- snapx = `stVal.hb.snapx + `stVal.hb.mindistx;
3055- }
3056- }
3057- if(!.m.isnan(`stVal.hb.maxdistx)) branch{
3058- cond `stVal.hb.snapf < 0:
3059- if(`sysfvar[.fX] < (`stVal.hb.snapx - `stVal.hb.maxdistx)){
3060- snapx = `stVal.hb.snapx - `stVal.hb.maxdistx;
3061- }
3062- else:
3063- if(`sysfvar[.fX] > (`stVal.hb.snapx + `stVal.hb.maxdistx)){
3064- snapx = `stVal.hb.snapx + `stVal.hb.maxdistx;
3065- }
3066- }
3067- if(!`stVal.hb.guarded || `stVal.typ == .StTy::A){
3068- if(
3069- !.m.isnan(`stVal.hb.mindisty)
3070- && `sysfvar[.fY] < (`stVal.hb.snapy + `stVal.hb.mindisty))
3071- {
3072- snapy = `stVal.hb.snapy + `stVal.hb.mindisty;
3073- }
3074- if(
3075- !.m.isnan(`stVal.hb.maxdisty)
3076- && `sysfvar[.fY] > (`stVal.hb.snapy + `stVal.hb.maxdisty))
3077- {
3078- snapy = `stVal.hb.snapy + `stVal.hb.maxdisty;
3079- }
3080- }
3081- if(!.m.isnan(snapx)) `stVal.hb.xoff = snapx - `sysfvar[.fX];
3082- if(!.m.isnan(snapy)) `stVal.hb.yoff = snapy - `sysfvar[.fY];
3083- ^`self c;
3084- if(#`stVal.hb.by > 0 && #(c = .players.get(`stVal.hb.by[-1].id)) > 0){
3085- if(`stVal.hb.snapt != 0){
3086- `setBindToId(c<>=);
3087- `setBindTime(`stVal.hb.snapt);
3088- `sysivar[.iBINDFACING] = 0;
3089- `sysfvar[.fBINDPOSX] =
3090- `stVal.hb.snapfx ? `stVal.hb.mindistx : 0.0/0.0;
3091- `sysfvar[.fBINDPOSY] =
3092- `stVal.hb.snapfy ? `stVal.hb.mindisty : 0.0/0.0;
3093- }
3094- }
30953018 if(`ho >= 0 && `stVal.ho[`ho].forceair != 0) `stVal.typ = .StTy::A;
30963019 branch{
30973020 int pn = `stVal.hb.p2getp1state ? `stVal.hb.player : `playerno;
@@ -6036,16 +5959,66 @@ public void PlayerList!&Char?::clsn(&.Char pyr=, bool pro)
60365959 `pyr.stVal.setHb(
60375960 hit=, guard, `pyr.stVal.mov == .MovTy::H || `pyr.ls(.lsGETHIT),
60385961 absdamage=);
6039- if(!.m.isnan(hit.snapx)) `pyr.stVal.hb.snapfx = true;
6040- if(
6041- !.m.isnan(hit.snapy)
6042- && (!`pyr.stVal.hb.guarded || `pyr.stVal.typ == .StTy::A))
60435962 {
6044- `pyr.stVal.hb.snapfy = true;
5963+ int byf = pro != 0 ? pro : by.facing;
5964+ if(pro == 0 && hitting == 1) branch{
5965+ cond hit.p1getp2facing != 0:
5966+ byf = `pyr.facing*(hit.p1getp2facing < 0 ? (int)-1 : 1);
5967+ cond hit.p1facing < 0:
5968+ byf *= -1;
5969+ }
5970+ bool snapfx = !.m.isnan(hit.snapx);
5971+ bool snapfy =
5972+ !.m.isnan(hit.snapy)
5973+ && (!`pyr.stVal.hb.guarded || `pyr.stVal.typ == .StTy::A);
5974+ float byx = by.sysfvar[.fX] + (float)(pro != 0) * x;
5975+ float byy = by.sysfvar[.fY] + (float)(pro != 0) * y;
5976+ float snapx = 0.0/0.0;
5977+ float snapy = 0.0/0.0;
5978+ if(!.m.isnan(hit.mindistx)) branch{
5979+ cond byf < 0:
5980+ if(`pyr.sysfvar[.fX] > (byx - hit.mindistx)){
5981+ snapx = byx - hit.mindistx;
5982+ }
5983+ else:
5984+ if(`pyr.sysfvar[.fX] < (byx + hit.mindistx)){
5985+ snapx = byx + hit.mindistx;
5986+ }
5987+ }
5988+ if(!.m.isnan(hit.maxdistx)) branch{
5989+ cond byf < 0:
5990+ if(`pyr.sysfvar[.fX] < (byx - hit.maxdistx)){
5991+ snapx = byx - hit.maxdistx;
5992+ }
5993+ else:
5994+ if(`pyr.sysfvar[.fX] > (byx + hit.maxdistx)){
5995+ snapx = byx + hit.maxdistx;
5996+ }
5997+ }
5998+ if(hitting == 1 || `pyr.stVal.typ == .StTy::A){
5999+ if(
6000+ !.m.isnan(hit.mindisty)
6001+ && `pyr.sysfvar[.fY] < (byy + hit.mindisty))
6002+ {
6003+ snapy = byy + hit.mindisty;
6004+ }
6005+ if(
6006+ !.m.isnan(hit.maxdisty)
6007+ && `pyr.sysfvar[.fY] > (byy + hit.maxdisty))
6008+ {
6009+ snapy = byy + hit.maxdisty;
6010+ }
6011+ }
6012+ if(!.m.isnan(snapx)) `pyr.stVal.hb.xoff += snapx - `pyr.sysfvar[.fX];
6013+ if(!.m.isnan(snapy)) `pyr.stVal.hb.yoff = snapy - `pyr.sysfvar[.fY];
6014+ if(hit.snapt != 0){
6015+ `pyr.setBindToId(by=);
6016+ `pyr.setBindTime(hit.snapt);
6017+ `pyr.sysivar[.iBINDFACING] = 0;
6018+ `pyr.sysfvar[.fBINDPOSX] = snapfx ? hit.mindistx : 0.0/0.0;
6019+ `pyr.sysfvar[.fBINDPOSY] = snapfy ? hit.mindisty : 0.0/0.0;
6020+ }
60456021 }
6046- `pyr.stVal.hb.snapx = by.sysfvar[.fX] + (float)(pro != 0) * x;
6047- `pyr.stVal.hb.snapf = pro != 0 ? pro : by.facing;
6048- `pyr.stVal.hb.snapy = by.sysfvar[.fY] + (float)(pro != 0) * y;
60496022 else:
60506023 absdamage = hitting == 1 ? hit.hitdamage : hit.guarddamage;
60516024 }
@@ -6256,7 +6229,6 @@ public void PlayerList!&Char?::clsn(&.Char pyr=, bool pro)
62566229 `pyr.stVal.hb.airtype -= `pyr.stVal.hb.airtype*2 - 3;
62576230 }
62586231 }
6259- if(pro == 0 && by.facing * by.p1facing < 0) `pyr.stVal.hb.snapf *= -1;
62606232 }
62616233 ret true;
62626234 }
--- a/ssz/trigger-script.ssz
+++ b/ssz/trigger-script.ssz
@@ -533,9 +533,9 @@ void gethitvar(&.lua.State L=, int re=)
533533 cond .s.equ("recovertime", ghv):
534534 n = (double).cwc~sysivar[.chr.iRECOVERTIME];
535535 cond .s.equ("xoff", ghv):
536- n = (double).cwc~stVal.hb.snapx;
536+ n = (double).cwc~stVal.hb.xoff;
537537 cond .s.equ("yoff", ghv):
538- n = (double).cwc~stVal.hb.snapy;
538+ n = (double).cwc~stVal.hb.yoff;
539539 cond .s.equ("xvel", ghv):
540540 n = .cwc~trHitXvel();
541541 cond .s.equ("yvel", ghv):