Skip to content

Commit

Permalink
SinguloLagFix
Browse files Browse the repository at this point in the history
Holy shit thanks goofball
  • Loading branch information
Yuuki authored and Yuuki committed Apr 13, 2015
1 parent 19ea695 commit 7b21ecf
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
// replaced by OPENCONTAINER flags and atom/proc/is_open_container()
///Chemistry.

var/allow_spin = 1
var/can_examine_reagents = 0 //For examining reagents
var/prepo = null //for managing extra name flair like "deep-fried".

Expand Down
5 changes: 4 additions & 1 deletion code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@
//use a modified version of Bresenham's algorithm to get from the atom's current position to that of the target

src.throwing = 1
if(target.allow_spin) // turns out 1000+ spinning objects being thrown at the singularity creates lag - Iamgoofball
SpinAnimation(5, 1)

/*
spawn(0)
var/length = 3
Expand All @@ -169,7 +172,7 @@
sleep(length)
length = min(length + 0.1, 6) // Slow the spin down over time to a minimum of 1 spin per 6 deciseconds

*/
var/dist_x = abs(target.x - src.x)
var/dist_y = abs(target.y - src.y)
var/dx = (target.x > src.x) ? EAST : WEST
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,8 @@
float(!has_gravity)

/mob/living/proc/float(on)
if(throwing)
return
if(on && !floating)
animate(src, pixel_y = 2, time = 10, loop = -1)
floating = 1
Expand Down
2 changes: 2 additions & 0 deletions code/modules/power/singularity/singularity.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
var/last_failed_movement = 0//Will not move in the same dir if it couldnt before, will help with the getting stuck on fields thing
var/last_warning

allow_spin = 0

/obj/singularity/New(loc, var/starting_energy = 50, var/temp = 0)
//CARN: admin-alert for chuckle-fuckery.
admin_investigate_setup()
Expand Down
11 changes: 10 additions & 1 deletion html/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h1>Hippie Station 13 Changelog!</h1>
<font size='2'><b>Game Admins:</b> TeamStab, Zadeon, Neemy, Medal12, Mocheeze, Limboo, ChronicPwnage, Crystalwarrior160, Augphlosion, Whitefox08, Lowresolution, Vievoora, Kokojo, Nexendia, Zyzarda, CobyB, Snake2512, LaWoGGamer, Solar Marine<br></font>
<br>
<font size='2'><b>Coding Team:</b> Nexendia, Scooterkid74, Redswandir, Kokojo, Whitefox08, Crystalwarrior<br></font>
<font size='2'><b>Spriting Team:</b> Nienhaus, Consgrove, 1block, Crystalwarrior<br></font>
<font size='2'><b>Spriting Team:</b> Nienhaus, 1block, Crystalwarrior<br></font>
<font size='2'><b>Mapping Team:</b> Barry, Kokojo, WhiteFox08<br></font>
<font size='2'><b>Mentors:</b> Krain7k, Cafaling, Apoll2947, Skitzofranik, Faceplant-Kun, HappyMacabre, Neoplague, McHatters, Sutskoen, Moiz, UtahRapter3, Somethings, OgardTheViking, Jackrip<br></font>

Expand All @@ -57,6 +57,15 @@ <h1>Hippie Station 13 Changelog!</h1>

<!-- DO NOT REMOVE OR MOVE THIS COMMENT! THIS MUST BE THE LAST NON-EMPTY LINE BEFORE THE LOGJS #ADDTOCHANGELOGMARKER# -->

<div class='commit sansserif'>
<h2 class='date'>13 April 2015</h2>
<h2 class='author'>Nexendia updated:</h2>
<ul class='changes bgimages16'>
<li class='experiment'>Possible Massive LagFix for the Singularity! Credit goes to Goofball for fixing.</li>
<li class='bugfix'>Fixed the broken links for Github/Forum/Rules</li>
</ul>
</div>

<div class='commit sansserif'>
<h2 class='date'>12 April 2015</h2>
<h3 class='author'>Crystalwarrior160 updated:</h3>
Expand Down

0 comments on commit 7b21ecf

Please sign in to comment.