Show
Ignore:
Timestamp:
02/28/10 22:45:14 (6 months ago)
Author:
gaul@…
Message:
  • ball hits paddle (keep bouncin'!)
  • NOTE: physics are computed on client only (TODO: sync)
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/cpp-ode/src/libmmpong/netgame.h

    r538 r540  
    55#include <set> 
    66#include <boost/thread/mutex.hpp> 
     7#include <boost/date_time/posix_time/posix_time.hpp> 
    78#include "netent.h" 
    89#include "netent_helper.h" 
     
    4546                //override in derived Game class implementing the actual  
    4647                //gameplay and physics 
    47                 virtual void advance(double step_ms) = 0; 
     48                //ATTENTION: the method should return exactly after the given time has passed 
     49                virtual void advance(const boost::posix_time::ptime endtime = boost::posix_time::microsec_clock::universal_time()) = 0; 
    4850                 
    49                 virtual double get_proposed_step_ms() { return 1.0/50; }; 
     51                //virtual double get_proposed_step_ms() { return 1.0/50; }; 
    5052 
    5153                //override in derived client class 
     
    116118                        return boost::dynamic_pointer_cast<CLASS>(get_ent(entid)); 
    117119                }; 
     120                 
     121                boost::posix_time::ptime world_time; //time of last advance() 
    118122 
    119123                //only server creates NetEnts