• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubybathyscaphegamephpguiwindowsc翻訳pythonomegattwitterframeworkbtronarduinovb.net計画中(planning stage)directxpreviewertestゲームエンジンdom

Go で書き直した Ikemen


Commit MetaInfo

Revisionbaeb303b92b8187047f1c7f3da32805d70406c3a (tree)
Time2019-05-22 23:50:13
Authorneatunsou <sisiy4excite@gmai...>
Commiterneatunsou

Log Message

ProjectileのPause時の挙動とattackmulsetの参照先を修正

Change Summary

Incremental Difference

--- a/src/char.go
+++ b/src/char.go
@@ -1070,41 +1070,42 @@ func (e *Explod) update(oldVer bool, playerNo int) {
10701070 }
10711071
10721072 type Projectile struct {
1073- hitdef HitDef
1074- id int32
1075- anim int32
1076- hitanim int32
1077- remanim int32
1078- cancelanim int32
1079- scale [2]float32
1080- clsnScale [2]float32
1081- remove bool
1082- removetime int32
1083- velocity [2]float32
1084- remvelocity [2]float32
1085- accel [2]float32
1086- velmul [2]float32
1087- hits int32
1088- misstime int32
1089- priority int32
1090- prioritypoint int32
1091- sprpriority int32
1092- edgebound int32
1093- stagebound int32
1094- heightbound [2]int32
1095- pos [2]float32
1096- facing float32
1097- shadow [3]int32
1098- supermovetime int32
1099- pausemovetime int32
1100- ani *Animation
1101- timemiss int32
1102- hitpause int32
1103- oldPos [2]float32
1104- newPos [2]float32
1105- aimg AfterImage
1106- palfx *PalFX
1107- localscl float32
1073+ hitdef HitDef
1074+ id int32
1075+ anim int32
1076+ hitanim int32
1077+ remanim int32
1078+ cancelanim int32
1079+ scale [2]float32
1080+ clsnScale [2]float32
1081+ remove bool
1082+ removetime int32
1083+ velocity [2]float32
1084+ remvelocity [2]float32
1085+ accel [2]float32
1086+ velmul [2]float32
1087+ hits int32
1088+ misstime int32
1089+ priority int32
1090+ prioritypoint int32
1091+ sprpriority int32
1092+ edgebound int32
1093+ stagebound int32
1094+ heightbound [2]int32
1095+ pos [2]float32
1096+ facing float32
1097+ shadow [3]int32
1098+ supermovetime int32
1099+ pausemovetime int32
1100+ ani *Animation
1101+ timemiss int32
1102+ hitpause int32
1103+ oldPos [2]float32
1104+ newPos [2]float32
1105+ aimg AfterImage
1106+ palfx *PalFX
1107+ localscl float32
1108+ parentAttackmul float32
11081109 }
11091110
11101111 func newProjectile() *Projectile {
@@ -1138,7 +1139,7 @@ func (p *Projectile) paused(playerNo int) bool {
11381139 return false
11391140 }
11401141 func (p *Projectile) update(playerNo int) {
1141- if sys.tickFrame() {
1142+ if sys.tickFrame() && !p.paused(playerNo) && p.hitpause == 0 {
11421143 rem := true
11431144 if p.anim >= 0 {
11441145 if p.hits < 0 && p.remove {
@@ -3125,6 +3126,7 @@ func (c *Char) newProj() *Projectile {
31253126 func (c *Char) projInit(p *Projectile, pt PosType, x, y float32,
31263127 op bool, rpg, rpn int32) {
31273128 p.setPos(c.helperPos(pt, [...]float32{x, y}, 1, &p.facing, p.localscl, true))
3129+ p.parentAttackmul = c.attackMul
31283130 if p.anim < -1 {
31293131 p.anim = 0
31303132 }
@@ -4792,7 +4794,7 @@ func (cl *CharList) update(cvmin, cvmax,
47924794 func (cl *CharList) clsn(getter *Char, proj bool) {
47934795 var gxmin, gxmax float32
47944796 hit := func(c *Char, hd *HitDef, pos [2]float32,
4795- projf float32, hits int32) (hitType int32) {
4797+ projf, attackMul float32, hits int32) (hitType int32) {
47964798 if !proj && c.ss.stateType == ST_L && hd.reversal_attr <= 0 {
47974799 c.hitdef.lhit = true
47984800 return 0
@@ -5089,7 +5091,7 @@ func (cl *CharList) clsn(getter *Char, proj bool) {
50895091 kill = hd.guard_kill
50905092 }
50915093 getter.ghv.damage += getter.computeDamage(
5092- float64(absdamage)*float64(hits), kill, false, c.attackMul)
5094+ float64(absdamage)*float64(hits), kill, false, attackMul)
50935095 if ghvset && getter.ghv.damage >= getter.life {
50945096 if kill || !live {
50955097 getter.ghv.fallf = true
@@ -5366,7 +5368,7 @@ func (cl *CharList) clsn(getter *Char, proj bool) {
53665368 hits = 1
53675369 }
53685370 if ht := hit(c, &p.hitdef, [...]float32{p.pos[0] - c.pos[0]*c.localscl/p.localscl,
5369- p.pos[1] - c.pos[1]*c.localscl/p.localscl}, p.facing, hits); ht != 0 {
5371+ p.pos[1] - c.pos[1]*c.localscl/p.localscl}, p.facing, p.parentAttackmul, hits); ht != 0 {
53705372 p.timemiss = ^Max(0, p.misstime)
53715373 if Abs(ht) == 1 {
53725374 sys.cgi[i].pctype = PC_Hit
@@ -5431,7 +5433,7 @@ func (cl *CharList) clsn(getter *Char, proj bool) {
54315433 if contact < 0 {
54325434 contact = 1
54335435 }
5434- if ht := hit(c, &c.hitdef, [2]float32{}, 0, 1); ht != 0 {
5436+ if ht := hit(c, &c.hitdef, [2]float32{}, 0, c.attackMul, 1); ht != 0 {
54355437 mvh := ht > 0 || c.hitdef.reversal_attr > 0
54365438 if Abs(ht) == 1 {
54375439 if mvh {