This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* http://www.myersdaily.org/joseph/javascript/md5-text.html | |
*/ | |
(function (global) { | |
var md5cycle = function (x, k) { | |
var a = x[0], | |
b = x[1], | |
c = x[2], | |
d = x[3]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Filters rattletrap replay JSON data into only rigid body updates in an easier-to-use format | |
def parseRBupdates(data): | |
playerNameMap = dict() # real_actor_id -> player_name | |
ballId = 0 # actor_id int - set later in the code (hopefully) | |
actorIdMap = dict() # temp_actor_id -> real_actor_id | |
rigidBodyUpdates = [] | |
for frame_number, frame in enumerate(data['content']['frames']): | |
for i, replication in enumerate(frame['replications']): | |
actorId = replication['actor_id']['value'] | |
if 'spawned_replication_value' in replication['value']: # Spawned something |