Skip to content

Instantly share code, notes, and snippets.

View Kolesias123's full-sized avatar

Iván Bravo Bravo Kolesias123

View GitHub Profile
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose: Sunlight shadow control entity.
//
// $NoKeywords: $
//=============================================================================//
#include "cbase.h"
#include "c_baseplayer.h"
//========= Copyright 1996-2005, Valve Corporation, All rights reserved. ============//
#include "cbase.h"
#include "hud.h"
#include "hudelement.h"
#include "hud_numericdisplay.h"
#include <vgui_controls/Panel.h>
function calculate(time, num)
{
var inte = ["segundo", "minuto", "hora", "día", "semana", "mes", "año"];
var dur = [60, 60, 24, 7, 4.35, 12];
time = parseInt(time);
var now = parseInt( Math.round((new Date()).getTime() / 1000) );
var j = 0;
var dif = 0;
//==== InfoSmart 2014. http://creativecommons.org/licenses/by/2.5/mx/ ===========//
#include "cbase.h"
#include "bot.h"
#include "in_utils.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
@Kolesias123
Kolesias123 / myentity_client.dart
Created November 6, 2014 04:52
Entidad con físicas en Cliente
class MyEntity extends PhysicsEntity
{
int m_iPings = 0;
// Esta función es llamada cuando se recibe información del servidor
void receiveDatatable( data )
{
m_iPings = data["Pings"];
Msg("[Cliente] ¡Llevo $m_iPings pings!");
@Kolesias123
Kolesias123 / myentity_server.dart
Last active August 29, 2015 14:08
Entidad con físicas en Servidor
class MyEntity extends PhysicsEntity
{
int m_iPings = 0;
int m_iThinks = 0;
// Esta función es llamada cada que se quiera enviar la entidad a los clientes
void prepareDatatable()
{
myTable.add( "Pings", m_iPings );
super.prepareDatatable();
@Kolesias123
Kolesias123 / demo.json
Created November 6, 2014 03:58
Mapa de prueba para Inix Engine
{
"options":
{
"lightEnviroment": "rgba(0, 0, 0, .97)"
},
"brushes":
{
"2":
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose: Sunlight shadow control entity.
//
// $NoKeywords: $
//=============================================================================//
#include "cbase.h"
#include "c_baseplayer.h"
//========= Copyright © 1996-2010, Valve Corporation, All rights reserved. ============//
//
// Purpose: global dynamic light.
//
// $NoKeywords: $
//=============================================================================//
#include "cbase.h"
#include "env_global_light.h"
@Kolesias123
Kolesias123 / gist:73fb25304a2f90f5288b
Last active August 29, 2015 14:07
[Apocalypse] Formula matemática para el calculo del ciclo de día y noche
Hora = sv_daynight_hour
Minutos = sv_daynight_minutes
mh = 8 [Puede cambiar según la función]
h = ( Hora - mh )
m = ( Minutos / 60 )
t = h + m
//13.84 = 180 / 13
15 = 180 / 12