Created
June 10, 2015 11:47
-
-
Save aldrik/7ae5eafdbaffd76889c6 to your computer and use it in GitHub Desktop.
Planetary Annihlation mod: DontLookAtMe
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
(function() { | |
/* Don't focus the camera on commander at spawn. */ | |
var lookAt = api.camera.lookAt; | |
var DontLookAtMe = function() { | |
api.camera.lookAt = lookAt; | |
}; | |
var event_message = handlers.event_message; | |
handlers.event_message = function(payload) { | |
if (payload.type === "commander_spawn") { | |
api.camera.lookAt = DontLookAtMe; | |
} | |
return event_message(payload); | |
}; | |
})(); |
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
var scene_mod_list = { | |
'live_game': [ | |
"coui://ui/mods/dontLookAtMe.js" | |
], | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment