Skip to content

Instantly share code, notes, and snippets.

View hawksprite's full-sized avatar

Justin Barnyak hawksprite

View GitHub Profile
CActionTypesSystem *poActionTypesSystem = GetMeeting()->GetActionTypesSystem();
CCharacter &oFocalCharacter = GetMeeting()->GetFocalCharacter();
float fGeneralDirection;
float fPersonalAlignement;
float fIdeaPlayingTension;
float fPotentialGroupAlignment;
float fInactivityCharacterUpdate;
float fTotalTensionIncrease;
float PI = m_oNext.m_oPersonalInfluence.GetCurrentValue();
float opinionOfPlayer = GetOpinionOfCharacter(ECHAR_ID_COREY);
// Gather some formal authority values
float formalAuthority = 0.0f;
float yourFormalAuthority = 0.0f;
float formalRespect = 0.0f;
for (int k = 0; k < (int)m_pkoMeeting->GetCharacters().size(); k++)
{
float PI = m_oNext.m_oPersonalInfluence.GetCurrentValue();
+ float opinionOfPlayer = GetOpinionOfCharacter(ECHAR_ID_COREY);
+ float formalAuthority = 0.0f;
- leadershipPotential /= 2.0f;
+ for (int k = 0; k < (int)m_pkoMeeting->GetCharacters().size(); k++)
+ {
+ CCharacter &roLookedCharacter = *m_pkoMeeting->GetCharacters()[k];
+ if (ECHAR_ID_COREY == roLookedCharacter.GetId())
+ {
Vector3 newLocation(){
newLocation = new Vector3(Random.Range(-40,40),Random.Range(-40,40),Random.Range(-40,40));
while(Vector3.Distance(playerLocation, newLocation) < 20){
newLocation = new Vector3(Random.Range(-40,40),Random.Range(-40,40),Random.Range(-40,40));
}
return newLocation;
}
int maxSpawn = 30; // Every 30 milliseconds
int minSpawn = 1000; // Every 1000 milliseconds
int maxTime = 300000; // How long till we reach the maximum spawn rate, 5 minutes in milliseconds
DateTime born;
DateTime spawn;
<?php
// Connect to DB
$hostName = "localhost";
$userName = "root";
$password = "#";
$dbName = "class";
$link = mysqli_connect($hostName, $userName, $password, $dbName) or die ("Error" . mysqli_error($link));
#!/bin/bash
sudo rm -r SL_Sparky
sudo rm -r /var/api/*
sudo git clone https://github.com/hawksprite/SL_Sparky.git
sudo cp -r SL_Sparky/Sparky/Sparky/* /var/api/
https://gist.github.com/
private Thread downloadFileThread;
void DownloadDatFile()
{
// The class is inherinty async so you don't need to put it in a thread, but if you want to monitor the progress
// in a "Snappy" manor in something like unity without worrying about the possible frame cap to disrupt thing from the Update callback
// then just use this setup to monitor it with a standard .NET thread
downloadFileThread = new Thread(new ThreadStart(threadDownloadDatFile));
downloadFileThread.Start();
public class Downloader {
public bool Finished = false;
public double TotalBytes = 0;
public double BytesRecieved = 0;
// Percent stuff
public float Progress { get { return ((float)Progress_Percent) / 100.0f; } }
public int Progress_Percent = 0;