Skip to content

PR Stack - Movement Optimizations - #12753

Open
fira wants to merge 10 commits into
cmss13-devs:masterfrom
fira:move-optimizations-2026
Open

PR Stack - Movement Optimizations#12753
fira wants to merge 10 commits into
cmss13-devs:masterfrom
fira:move-optimizations-2026

Conversation

@fira

@fira fira commented Jul 28, 2026

Copy link
Copy Markdown
Member

About the pull request

8 independent changes to optimize/maintain core movement code that has been untouched since forever.
None of these is a real gamechanger, but together they should improve performance slightly. We have a lot of players and we do a lot of movement, you see. And not only the players move. It adds up, really fast.

Contents

Chapter 1: Refactor nutrition

Moves nutrition around to kill an unncessary /mob/living/carbon/Move that did nothing else.

Chapter 2: Remove COMSIG_ATOM_EXITED

Swaps that signal for a more traditional COMSIG_MOVABLE_MOVED in minimap.
This allows to remove the /atom/Exited handler, which is executed for every move of everything, all the time.
At a glance this should net 0.5% perf on movement. Could not properly test it though...

Chapter 3: Remove COMSIG_MOVABLE_ENTERED_OBJ

Same story as above. This one only fires on /obj moves so it's less of a deal.

Chapter 4: Modernize /turf/Enter

This is the fun one! It's mostly maintenance save for a few removed typechecks.
Renames and shuffles all the relevant variables in collision checks for movement to be on par with standard code.
Also clears a very weird misconception (forget -> oldloc) and uses BYOND provided oldloc, instead of infering it from object.

Chapter 5: Nukes nuke disk code

We simply don't use that.

Chapter 6: /turf/Entered optimization

Just removes an unneeded typecheck. That's it.

Chapter 7: Signalify handle_rotation

As for Chapter 2, that was firing in every /atom/movable/Move when it was only needed in a couple cases.
I implemented it by COMSIG_ATOM_DIR_CHANGE in chairs, but as far as i can see, everything already has handlers for it already? It's possible i missed some cases though.

Chapter 8: kill /mob/living/carbon/human/Crossed

This is probably the biggest offender for mob movement, Crossed() is fired against every content of everything you move to.
As it turns out, MuleBots don't work anyway so they don't need to run over anything.
As for vehicles, RunOver() was a placeholder proc that didn't do anything.
Gone.

Testing Photographs and Procedure

Changes were tested individually in a basic fashion, but changes in move code reach out everywhere, so this will need live testing.

Changelog

🆑
del: MULEbots cannot run people over anymore. They still can't really move either way.
/:cl:

@fira fira added the Performance the game sucks and this makes it suck less label Jul 28, 2026
@fira fira added the Needs Testing Need to test it on the guinea pigs (production server) label Jul 28, 2026
@github-project-automation github-project-automation Bot moved this to Awaiting Review in Review Backlog Jul 28, 2026
@cmss13-ci cmss13-ci Bot added Removal snap size/L Denotes a PR that changes 200-799 lines, ignoring generated files. labels Jul 28, 2026
@cm13-github

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@cm13-github cm13-github added the Merge Conflict PR can't be merged because it touched too much code label Jul 29, 2026
@fira
fira force-pushed the move-optimizations-2026 branch from 0e084f0 to a4b17e5 Compare July 29, 2026 10:06
@cm13-github

Copy link
Copy Markdown
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@cm13-github cm13-github added Merge Conflict PR can't be merged because it touched too much code and removed Merge Conflict PR can't be merged because it touched too much code labels Jul 29, 2026
@cm13-github

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@fira
fira force-pushed the move-optimizations-2026 branch from a4b17e5 to 408188a Compare July 31, 2026 13:45
@cm13-github

Copy link
Copy Markdown
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@cm13-github cm13-github removed the Merge Conflict PR can't be merged because it touched too much code label Jul 31, 2026
@fira fira added the Testmerge Candidate we'll test this while you're asleep and the server has 10 players label Jul 31, 2026
@cm13-github cm13-github added the Merge Conflict PR can't be merged because it touched too much code label Aug 1, 2026
@cm13-github

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@fira
fira force-pushed the move-optimizations-2026 branch from 408188a to d25b517 Compare August 1, 2026 11:43
@cm13-github cm13-github removed the Merge Conflict PR can't be merged because it touched too much code label Aug 1, 2026
@cm13-github

Copy link
Copy Markdown
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@fira

fira commented Aug 1, 2026

Copy link
Copy Markdown
Member Author

Needs a second round of local testing before being put on TM

@cm13-github

cm13-github commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Test merge deployment history:

Test Merge Deployed @ 08/01/2026 13:54:08 +00:00:
Server Instance

CM13 Live

Revision

Origin: 9392acb
Pull Request: d25b517
Server: dc43f7f

Test Merge Removed @ 08/01/2026 14:34:34 +00:00:
Server Instance

CM13 Live

Test Merge Deployed @ 08/05/2026 04:24:14 +00:00:
Server Instance

CM13 Live

Revision

Origin: 0f81001
Pull Request: 0c4e080
Server: 4f0272a

Test Merge Updated @ 08/05/2026 06:43:39 +00:00:
Server Instance

CM13 Live

Revision

Origin: 1207932
Pull Request: 0c4e080
Server: 36e901d8a308345db212b8ca08a17f1f58235a47

Test Merge Updated @ 08/05/2026 08:44:53 +00:00:
Server Instance

CM13 Live

Revision

Origin: ee396c5
Pull Request: 0c4e080
Server: 2cf7b036b5d47c4028d8e823ae214727c0b1b979

Test Merge Updated @ 08/05/2026 09:47:11 +00:00:
Server Instance

CM13 Live

Revision

Origin: ee396c5
Pull Request: 0c4e080
Server: ade1781

Test Merge Updated @ 08/06/2026 03:20:30 +00:00:
Server Instance

CM13 Live

Revision

Origin: 8844d79
Pull Request: 0c4e080
Server: 9216c1af03637fc32312b0ed6561459846831e4b

Test Merge Updated @ 08/06/2026 07:52:24 +00:00:
Server Instance

CM13 Live

Revision

Origin: 8844d79
Pull Request: 3082e3c
Server: e46cecb

Test Merge Updated @ 08/06/2026 23:56:47 +00:00:
Server Instance

CM13 Live

Revision

Origin: 8512659
Pull Request: 3082e3c
Server: 6ff81038d4fe9d9efb3d2612f10678cd538e834f

Test Merge Updated @ 08/07/2026 02:58:08 +00:00:
Server Instance

CM13 Live

Revision

Origin: 059f644
Pull Request: 3082e3c
Server: 9948b722e1e8ca48ee15f9186838c94ca023abfc

Test Merge Updated @ 08/07/2026 03:59:03 +00:00:
Server Instance

CM13 Live

Revision

Origin: 0403d80
Pull Request: 3082e3c
Server: 80f707fd92ac4ce9fe5eb268fdc9c0dc94376461

Test Merge Updated @ 08/07/2026 04:29:51 +00:00:
Server Instance

CM13 Live

Revision

Origin: 87c49b1
Pull Request: 3082e3c
Server: 2e82bcf36cc400956f5bcedb1cd3d88d19282ba5

Test Merge Updated @ 08/07/2026 05:00:38 +00:00:
Server Instance

CM13 Live

Revision

Origin: 5f61c57
Pull Request: 3082e3c
Server: 24f75f66ce568852a2710636ae138d78c86ffd4f

Test Merge Updated @ 08/07/2026 18:04:27 +00:00:
Server Instance

CM13 Live

Revision

Origin: 878ffb6
Pull Request: 3082e3c
Server: 82cab8ed505e6a73d1b95e63e321e4b371f54394

Test Merge Updated @ 08/07/2026 18:35:17 +00:00:
Server Instance

CM13 Live

Revision

Origin: 9ab6eea
Pull Request: 3082e3c
Server: 2c8ca9e115497eaf4dae0005f85d5d3d63e50dc2

Test Merge Updated @ 08/08/2026 02:07:37 +00:00:
Server Instance

CM13 Live

Revision

Origin: 17f0618
Pull Request: 3082e3c
Server: 37c7fe78a3eac2f6946fe729ec793c1cc38a309d

Test Merge Updated @ 08/08/2026 03:38:48 +00:00:
Server Instance

CM13 Live

Revision

Origin: 17f0618
Pull Request: 3082e3c
Server: 72391ef

Test Merge Updated @ 08/08/2026 04:08:36 +00:00:
Server Instance

CM13 Live

Revision

Origin: 17f0618
Pull Request: 3082e3c
Server: 07612f9

Test Merge Updated @ 08/08/2026 04:30:45 +00:00:
Server Instance

CM13 Live

Revision

Origin: 17f0618
Pull Request: 3082e3c
Server: 6818a1f

Test Merge Updated @ 08/08/2026 09:40:53 +00:00:
Server Instance

CM13 Live

Revision

Origin: 17f0618
Pull Request: 3082e3c
Server: 9bf59ed

Test Merge Updated @ 08/08/2026 18:43:44 +00:00:
Server Instance

CM13 Live

Revision

Origin: 17f0618
Pull Request: 3082e3c
Server: 3ad5c12

Test Merge Updated @ 08/08/2026 22:45:41 +00:00:
Server Instance

CM13 Live

Revision

Origin: 611209a
Pull Request: 3082e3c
Server: e1d0912

Test Merge Updated @ 08/09/2026 02:17:16 +00:00:
Server Instance

CM13 Live

Revision

Origin: e33d2e4
Pull Request: 3082e3c
Server: 2a0032c7b8e63d404fd688f573bb7f2bd46df44d

Test Merge Updated @ 08/09/2026 03:48:23 +00:00:
Server Instance

CM13 Live

Revision

Origin: 4315ddf
Pull Request: 3082e3c
Server: a2a48d5b42d0323046ad55b4f1d8775d7652b74e

Test Merge Updated @ 08/09/2026 05:17:00 +00:00:
Server Instance

CM13 Live

Revision

Origin: 40fa4d0
Pull Request: 3082e3c
Server: 7d7cd33

Test Merge Updated @ 08/09/2026 05:49:32 +00:00:
Server Instance

CM13 Live

Revision

Origin: 5681f98
Pull Request: 3082e3c
Server: 98b7546278ab4713db2f20626a62eceb7a32c667

Test Merge Updated @ 08/09/2026 06:20:19 +00:00:
Server Instance

CM13 Live

Revision

Origin: 0ed4525
Pull Request: 3082e3c
Server: c768ab3e60121201e5039edb2914c1d597f7b890

Test Merge Updated @ 08/09/2026 15:22:47 +00:00:
Server Instance

CM13 Live

Revision

Origin: 3bf09bc
Pull Request: 3082e3c
Server: ac224de25507526818634d1718c5d4dbf7bc8cc8

Test Merge Updated @ 08/09/2026 15:53:35 +00:00:
Server Instance

CM13 Live

Revision

Origin: ccfdf68
Pull Request: 3082e3c
Server: 6e76cef0286df1f21d5bcbfa19717e596ae0a043

Test Merge Updated @ 08/09/2026 16:24:23 +00:00:
Server Instance

CM13 Live

Revision

Origin: 6c4c2de
Pull Request: 3082e3c
Server: 1d3bb9e1786ea6376a2119736915ad8be21a3972

Test Merge Updated @ 08/09/2026 16:55:12 +00:00:
Server Instance

CM13 Live

Revision

Origin: fa93b12
Pull Request: 3082e3c
Server: f685b21a95e2372e5b81be0adc86b599052f1e35

Test Merge Updated @ 08/09/2026 17:26:00 +00:00:
Server Instance

CM13 Live

Revision

Origin: ecbb41f
Pull Request: 3082e3c
Server: 098d4a8f60a26103426f8e3071a7e082c2cc3246

Test Merge Updated @ 08/10/2026 02:28:24 +00:00:
Server Instance

CM13 Live

Revision

Origin: 61af848
Pull Request: 3082e3c
Server: 9f66bfe063bf15e2af46a2e3abcf5a13be0efbb5

Test Merge Updated @ 08/10/2026 05:29:42 +00:00:
Server Instance

CM13 Live

Revision

Origin: 82b934d
Pull Request: 3082e3c
Server: fd2f928859e094a18d18e17fce459f98c82adc84

Test Merge Updated @ 08/10/2026 06:00:30 +00:00:
Server Instance

CM13 Live

Revision

Origin: 2bc00b4
Pull Request: 3082e3c
Server: 55055280a803c9097a54167f08033e5559751ed4

Test Merge Updated @ 08/10/2026 14:55:49 +00:00:
Server Instance

CM13 Live

Revision

Origin: 2bc00b4
Pull Request: 3082e3c
Server: bba2fa7

Test Merge Updated @ 08/10/2026 16:20:29 +00:00:
Server Instance

CM13 Live

Revision

Origin: 2bc00b4
Pull Request: 3082e3c
Server: 729817f

Test Merge Updated @ 08/10/2026 17:14:32 +00:00:
Server Instance

CM13 Live

Revision

Origin: 2bc00b4
Pull Request: 3082e3c
Server: 0e4cf95

Test Merge Updated @ 08/10/2026 19:09:43 +00:00:
Server Instance

CM13 Live

Revision

Origin: 2bc00b4
Pull Request: 3082e3c
Server: 24d02c1

Test Merge Updated @ 08/10/2026 19:43:32 +00:00:
Server Instance

CM13 Live

Revision

Origin: 2bc00b4
Pull Request: 3082e3c
Server: 341d35c

Test Merge Updated @ 08/10/2026 20:39:02 +00:00:
Server Instance

CM13 Live

Revision

Origin: 2bc00b4
Pull Request: 3082e3c
Server: 906841f

Test Merge Updated @ 08/11/2026 00:35:06 +00:00:
Server Instance

CM13 Live

Revision

Origin: 2bc00b4
Pull Request: 3082e3c
Server: 657673d

Test Merge Updated @ 08/11/2026 02:06:09 +00:00:
Server Instance

CM13 Live

Revision

Origin: 74c04bd
Pull Request: 3082e3c
Server: b539256471b7e3753be0c7d4cecbbfa51d560af0

Test Merge Updated @ 08/11/2026 07:38:02 +00:00:
Server Instance

CM13 Live

Revision

Origin: 5fdd4e6
Pull Request: 3082e3c
Server: d3a0bad8e5dc7c64f76487b233150b5ebe1a1f9d

Test Merge Updated @ 08/11/2026 08:32:39 +00:00:
Server Instance

CM13 Live

Revision

Origin: 5fdd4e6
Pull Request: 3082e3c
Server: febe787

Test Merge Updated @ 08/11/2026 13:29:19 +00:00:
Server Instance

CM13 Live

Revision

Origin: 5fdd4e6
Pull Request: 3082e3c
Server: d816dae

Test Merge Updated @ 08/11/2026 21:11:37 +00:00:
Server Instance

CM13 Live

Revision

Origin: 5fdd4e6
Pull Request: 3082e3c
Server: fae42fd

Test Merge Updated @ 08/12/2026 02:13:27 +00:00:
Server Instance

CM13 Live

Revision

Origin: da283ac
Pull Request: 3082e3c
Server: 3b343b647f8b71218f491c98edd169cf83a2b67a

Test Merge Updated @ 08/12/2026 03:14:23 +00:00:
Server Instance

CM13 Live

Revision

Origin: 2de69ec
Pull Request: 3082e3c
Server: 54c73aeb580d57a33780932e53988ff598392ebc

Test Merge Updated @ 08/13/2026 01:28:49 +00:00:
Server Instance

CM13 Live

Revision

Origin: fcd8706
Pull Request: 3082e3c
Server: 6a73bb5

Test Merge Updated @ 08/13/2026 02:20:09 +00:00:
Server Instance

CM13 Live

Revision

Origin: 1642f4c
Pull Request: 3082e3c
Server: ba693a51e840cc2e9f9fd4bb58bee605ed87bb39

Test Merge Updated @ 08/13/2026 03:51:09 +00:00:
Server Instance

CM13 Live

Revision

Origin: 2281510
Pull Request: 3082e3c
Server: 46bc9442bb68d02ed071cb1d4fc080c511340056

Test Merge Updated @ 08/13/2026 04:49:04 +00:00:
Server Instance

CM13 Live

Revision

Origin: 6084bb1
Pull Request: 3082e3c
Server: 3bad837

Test Merge Removed @ 08/13/2026 04:50:40 +00:00:
Server Instance

CM13 Live

@fira fira removed the Needs Testing Need to test it on the guinea pigs (production server) label Aug 3, 2026
@fira

fira commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

This prevents the ARC from moving right now, not merge viable until this is fixed

@fira
fira marked this pull request as draft August 4, 2026 17:25
@Drulikar

Drulikar commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Somereason this makes help intent into open_space trigger both a fall and a climb down (instead of preventing movement forward for the climb only to occur instead)

do a flip

@fira

fira commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

Should be fixed now, mishap with the way the return value was handled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Performance the game sucks and this makes it suck less Removal snap size/L Denotes a PR that changes 200-799 lines, ignoring generated files.

Projects

Status: Awaiting Review

Development

Successfully merging this pull request may close these issues.

3 participants