Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
game-server-flip-jump
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Gia Vương
game-server-flip-jump
Commits
a727026b
Commit
a727026b
authored
Aug 22, 2025
by
Vũ Gia Vương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--init branch multi-core
parent
9638dab2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
socket.ts
src/socket.ts
+1
-0
No files found.
src/socket.ts
View file @
a727026b
...
@@ -137,6 +137,7 @@ async function passTower(socket: Socket, data: IRequestPassTower, user: User) {
...
@@ -137,6 +137,7 @@ async function passTower(socket: Socket, data: IRequestPassTower, user: User) {
// xDistance_ += speed * DT;
// xDistance_ += speed * DT;
// }
// }
const
acceleration
=
Math
.
min
(
towerNumber
-
MAX_TOWER
,
A_POWER
)
*
DT
;
const
acceleration
=
Math
.
min
(
towerNumber
-
MAX_TOWER
,
A_POWER
)
*
DT
;
speed
+=
data
.
step
*
acceleration
;
speed
+=
data
.
step
*
acceleration
;
xDistance_
+=
INIT_SPEED
*
data
.
step
*
DT
+
acceleration
*
DT
*
(
data
.
step
*
(
data
.
step
-
1
))
/
2
;
xDistance_
+=
INIT_SPEED
*
data
.
step
*
DT
+
acceleration
*
DT
*
(
data
.
step
*
(
data
.
step
-
1
))
/
2
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment