~armagetronad-ap/armagetronad/BattleMania

« back to all changes in this revision

Viewing changes to src/tron/chat.php

  • Committer: zodiacsohma1 at gmail
  • Date: 2014-03-07 04:20:29 UTC
  • Revision ID: zodiacsohma1@gmail.com-20140307042029-34oc5evovei40uik
Added #death_time variable to cycle.php
Renamed Attack functions to suitable names which make better sense and purpose.
Renamed KillTheKingInteract function to KillTheKingInteractAllowed for purposeful definition.
Renamed RandomColors function to RandomColorsRGB for purposeful definition.
Changed the integer value of DELAY_COMMAND function to float value.
Used BridgePieces function in config.php to grab values.
Simplify the chat string in chat.php for script memory check.

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
        {
104
104
            $unit = array('b','kb','mb','gb','tb','pb');
105
105
            $size = memory_get_usage();
106
 
            pm($player, "Script memory usage: ".@round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i]);
 
106
 
 
107
            $int = intval(floor(log($size, 1024)));
 
108
            $pow = pow(1024, $int, 2);
 
109
 
 
110
            pm($player, "Script memory usage: ".round($size / $pow).' '.$unit[$int]);
107
111
        }
108
112
        elseif (strtolower(Base::$base->pieces[1]) == "/attacks")
109
113
        {