13 lines
4.6 KiB
HTML
13 lines
4.6 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../"><link rel="stylesheet" href="dmdoc.css"><title>code/__DEFINES/movement.dm - /tg/ Station 13</title></head><body><header><a href="index.html">/tg/ Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a> — <a href="code/__DEFINES/movement.html#define">Define Details</a></header><main><h1>code/__DEFINES/movement.dm <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/movement.dm0"><img src="git.png" width="16" height="16" title="code/__DEFINES/movement.dm0"></a></h1><table class="summary" cellspacing="0"><tr><th><a href="code/__DEFINES/movement.html#define/MIN_GLIDE_SIZE">MIN_GLIDE_SIZE</a></th><td>The minimum for glide_size to be clamped to.</td></tr><tr><th><a href="code/__DEFINES/movement.html#define/MAX_GLIDE_SIZE">MAX_GLIDE_SIZE</a></th><td>The maximum for glide_size to be clamped to.
|
|
This shouldn't be higher than the icon size, and generally you shouldn't be changing this, but it's here just in case.</td></tr><tr><th><a href="code/__DEFINES/movement.html#define/DELAY_TO_GLIDE_SIZE">DELAY_TO_GLIDE_SIZE</a></th><td>Broken down, here's what this does:
|
|
divides the world icon_size (32) by delay divided by ticklag to get the number of pixels something should be moving each tick.
|
|
The division result is given a min value of 1 to prevent obscenely slow glide sizes from being set
|
|
Then that's multiplied by the global glide size multiplier. 1.25 by default feels pretty close to spot on. This is just to try to get byond to behave.
|
|
The whole result is then clamped to within the range above.
|
|
Not very readable but it works</td></tr><tr><th><a href="code/__DEFINES/movement.html#define/SMOOTH_MOVEMENT">SMOOTH_MOVEMENT</a></th><td>Enables smooth movement</td></tr><tr><th><a href="code/__DEFINES/movement.html#define/SET_APPEARANCE_FLAGS">SET_APPEARANCE_FLAGS</a></th><td>Set appearance flags in vars</td></tr></table><h2 id="define">Define Details</h2><h3 id="define/DELAY_TO_GLIDE_SIZE"><aside class="declaration">#define </aside>DELAY_TO_GLIDE_SIZE<aside>(delay)</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/movement.dm#L16"><img src="git.png" width="16" height="16" title="code/__DEFINES/movement.dm 16"></a></h3><p>Broken down, here's what this does:
|
|
divides the world icon_size (32) by delay divided by ticklag to get the number of pixels something should be moving each tick.
|
|
The division result is given a min value of 1 to prevent obscenely slow glide sizes from being set
|
|
Then that's multiplied by the global glide size multiplier. 1.25 by default feels pretty close to spot on. This is just to try to get byond to behave.
|
|
The whole result is then clamped to within the range above.
|
|
Not very readable but it works</p><h3 id="define/MAX_GLIDE_SIZE"><aside class="declaration">#define </aside>MAX_GLIDE_SIZE <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/movement.dm#L5"><img src="git.png" width="16" height="16" title="code/__DEFINES/movement.dm 5"></a></h3><p>The maximum for glide_size to be clamped to.
|
|
This shouldn't be higher than the icon size, and generally you shouldn't be changing this, but it's here just in case.</p><h3 id="define/MIN_GLIDE_SIZE"><aside class="declaration">#define </aside>MIN_GLIDE_SIZE <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/movement.dm#L2"><img src="git.png" width="16" height="16" title="code/__DEFINES/movement.dm 2"></a></h3><p>The minimum for glide_size to be clamped to.</p><h3 id="define/SET_APPEARANCE_FLAGS"><aside class="declaration">#define </aside>SET_APPEARANCE_FLAGS<aside>(_flags)</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/movement.dm#L23"><img src="git.png" width="16" height="16" title="code/__DEFINES/movement.dm 23"></a></h3><p>Set appearance flags in vars</p><h3 id="define/SMOOTH_MOVEMENT"><aside class="declaration">#define </aside>SMOOTH_MOVEMENT <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/__DEFINES/movement.dm#L19"><img src="git.png" width="16" height="16" title="code/__DEFINES/movement.dm 19"></a></h3><p>Enables smooth movement</p></main><footer>tgstation.dme <a href="https://github.com/evilew/GS13-Citadel/tree/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e">e8e0068</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.9.0</a></footer></body></html> |