This file contains hidden or 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
let b = ncollide::shape::Ball::new(0.5f32); | |
let m1 = na::Iso3::new(na::zero(), na::zero()); | |
let m2 = na::Iso3::new(na::Vec3::new(0.0, 10.0, 0.0), na::zero()); | |
let cast = ncollide::geometry::time_of_impact_internal::shape_against_shape(&m1, &na::Vec3::new(0.0, 10.0, 0.0), &b, | |
&m2, &na::zero(), &b); |
This file contains hidden or 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
use core; | |
use core::prelude::*; | |
use collections; | |
pub struct ObfuscatedString { | |
crypted: &'static [u8], | |
key: &'static [u8] | |
} | |
impl ObfuscatedString { |
This file contains hidden or 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
let iAttachment = match event { | |
CL_EVENT_DISPATCHEFFECT0 => 0, | |
CL_EVENT_DISPATCHEFFECT1 => 1, | |
CL_EVENT_DISPATCHEFECT2 => 2 | |
}; |
This file contains hidden or 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
let len; | |
loop { | |
match socket.read(&mut buf) { | |
Ok(readlen) => { len = readlen; break; }, | |
Err(IoError { kind: TimedOut, .. }) => (), // busywait | |
Err(e) => panic!("Failed reading from socket: {}", e) | |
} | |
} | |
// len now contains the number of valid bytes in buf |
This file contains hidden or 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
use std::collections::{ | |
RingBuf | |
}; | |
use std::default::{ | |
Default | |
}; | |
use std::sync::{ | |
Arc, | |
Mutex, | |
RWLock, |
This file contains hidden or 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
#![feature(associated_types)] | |
#![feature(unsafe_destructor)] | |
#![feature(unboxed_closures)] | |
#![allow(missing_docs)] | |
extern crate alloc; | |
use std::collections::RingBuf; | |
use std::iter::range_step; | |
use std::mem; |
This file contains hidden or 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
#![feature(associated_types)] | |
#![feature(unsafe_destructor)] | |
#![feature(unboxed_closures)] | |
#![allow(missing_docs)] | |
extern crate alloc; | |
use std::collections::RingBuf; | |
use std::iter::range_step; | |
use std::mem; |
This file contains hidden or 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
use std::ops::{Index, IndexMut}; | |
macro_rules! fastidx_arr( | |
($contents: expr) => ( | |
unsafe { | |
FastIdxArr::new($contents, || ()) | |
} | |
) | |
); |
This file contains hidden or 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
fn is_valid_target(&self, ent: sdk::raw::C_BaseEntityPtr) -> bool { | |
let class = ent.get_classname(); | |
class == obf!("CTFProjectile_Rocket") || | |
class == obf!("CTFProjectile_Flare") || | |
class == obf!("CTFProjectiled_EnergyBall") || | |
class == obf!("CTFProjectile_HealingBolt") || | |
class == obf!("CTFProjectile_Arrow") || | |
class == obf!("CTFProjectile_SentryRocket") || | |
class == obf!("CTFProjectile_Cleaver" ) || | |
class == obf!("CTFProjectile_JarMilk" ) || |
This file contains hidden or 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
extern crate arena; | |
#[derive(Show)] | |
enum Node<'a> { | |
Cons(u32, &'a Node<'a>), | |
Nil | |
} | |
fn main() { | |
let a = arena::TypedArena::new(); |