mirror of
https://github.com/genxium/DelayNoMore
synced 2024-12-26 03:39:00 +00:00
Fixed bullet cloning.
This commit is contained in:
parent
83419a6f23
commit
a48e2f3cc0
@ -518,7 +518,7 @@
|
|||||||
"array": [
|
"array": [
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
342.9460598986377,
|
216.50635094610968,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -33,7 +33,7 @@ cc.Class({
|
|||||||
/** Init required prefab ended. */
|
/** Init required prefab ended. */
|
||||||
|
|
||||||
self.inputFrameUpsyncDelayTolerance = 2;
|
self.inputFrameUpsyncDelayTolerance = 2;
|
||||||
self.collisionMinStep = 8;
|
self.collisionMinStep = 16;
|
||||||
|
|
||||||
self.renderCacheSize = 128;
|
self.renderCacheSize = 128;
|
||||||
self.serverFps = 60;
|
self.serverFps = 60;
|
||||||
|
File diff suppressed because one or more lines are too long
@ -819,7 +819,7 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *resolv.Rin
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
fireballBullet := nextRenderFrameFireballBullets[fireballBulletCnt]
|
fireballBullet := nextRenderFrameFireballBullets[fireballBulletCnt]
|
||||||
CloneFireballBullet(prevFireball.BlState, prevFireball.FramesInBlState, prevFireball.VirtualGridX, prevFireball.VirtualGridY, prevFireball.DirX, prevFireball.DirY, prevFireball.VelX, prevFireball.VelY, prevFireball.Speed, prevFireball.BattleAttr.BulletLocalId, prevFireball.BattleAttr.OriginatedRenderFrameId, prevFireball.BattleAttr.OffenderJoinIndex, prevFireball.BattleAttr.TeamId, prevFireball.Bullet, fireballBullet)
|
CloneFireballBullet(prevFireball.BlState, prevFireball.FramesInBlState+1, prevFireball.VirtualGridX, prevFireball.VirtualGridY, prevFireball.DirX, prevFireball.DirY, prevFireball.VelX, prevFireball.VelY, prevFireball.Speed, prevFireball.BattleAttr.BulletLocalId, prevFireball.BattleAttr.OriginatedRenderFrameId, prevFireball.BattleAttr.OffenderJoinIndex, prevFireball.BattleAttr.TeamId, prevFireball.Bullet, fireballBullet)
|
||||||
|
|
||||||
if IsFireballBulletAlive(fireballBullet, currRenderFrame) {
|
if IsFireballBulletAlive(fireballBullet, currRenderFrame) {
|
||||||
if IsFireballBulletActive(fireballBullet, currRenderFrame) {
|
if IsFireballBulletActive(fireballBullet, currRenderFrame) {
|
||||||
@ -856,10 +856,7 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *resolv.Rin
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
meleeBullet := nextRenderFrameMeleeBullets[meleeBulletCnt]
|
meleeBullet := nextRenderFrameMeleeBullets[meleeBulletCnt]
|
||||||
meleeBullet.Bullet = prevMelee.Bullet
|
CloneMeleeBullet(prevMelee.BlState, prevMelee.FramesInBlState+1, prevMelee.BattleAttr.BulletLocalId, prevMelee.BattleAttr.OriginatedRenderFrameId, prevMelee.BattleAttr.OffenderJoinIndex, prevMelee.BattleAttr.TeamId, prevMelee.Bullet, meleeBullet)
|
||||||
meleeBullet.BattleAttr = prevMelee.BattleAttr
|
|
||||||
meleeBullet.FramesInBlState = prevMelee.FramesInBlState + 1
|
|
||||||
meleeBullet.BlState = prevMelee.BlState
|
|
||||||
|
|
||||||
if IsMeleeBulletAlive(meleeBullet, currRenderFrame) {
|
if IsMeleeBulletAlive(meleeBullet, currRenderFrame) {
|
||||||
offender := currRenderFrame.PlayersArr[meleeBullet.BattleAttr.OffenderJoinIndex-1]
|
offender := currRenderFrame.PlayersArr[meleeBullet.BattleAttr.OffenderJoinIndex-1]
|
||||||
|
Loading…
Reference in New Issue
Block a user